E
Eps
Hi there,
I believe all strings in .net are unicode by default, I am looking for a
way to remove all non ascii characters from a string (or optionally
replace them).
There is an article on code project which kind of looks like it does
what I want but I can't help thinking it makes it more complex than it
needs to be.
I have looked at the msdn pages to do with Encodings but I am not very
familiar with this topic.
If I can get a list of ascii characters then it should be easy to write
a method that checks each char against the list and performs the replace
or remove operation if necessary. Yet I can't find anything exactly
like this with trusty old google, is there something I am missing ?.
If it helps the reason I need this is because I am writing a front end
for the lame command line mp3 encoder, it doesn't like being passed, or
asked to output to, file paths containing unicode characters.
I believe all strings in .net are unicode by default, I am looking for a
way to remove all non ascii characters from a string (or optionally
replace them).
There is an article on code project which kind of looks like it does
what I want but I can't help thinking it makes it more complex than it
needs to be.
I have looked at the msdn pages to do with Encodings but I am not very
familiar with this topic.
If I can get a list of ascii characters then it should be easy to write
a method that checks each char against the list and performs the replace
or remove operation if necessary. Yet I can't find anything exactly
like this with trusty old google, is there something I am missing ?.
If it helps the reason I need this is because I am writing a front end
for the lame command line mp3 encoder, it doesn't like being passed, or
asked to output to, file paths containing unicode characters.