![]() |
Removing invalid characters from a string
I don't know if I'm not looking hard enough, but I couldn't find a topic on this, so I'm posting it here.
Essentially, in my nsis program I'm running some of the files have strange characters like " ®" or "©". They're problemful for me and I need them removed from the string itself. So for example, $0 contains: "Application Name Example® v1.0" I need it to become: "Application Name Example v1.0" I know there are results about removing the more standard 'found on keyboard' invalid characters, but what about ones like these? I've tried: code: But that doesn't seem to work. Any workaround to this? |
|
I took a look at that function before hand, and from what I gather, all it does is flag me if the string contains an invalid character, correct me if I'm wrong.
I need to actually remove it from the string though |
I think it'd be best to write your own function for this. Iterate through all characters in A and copy to B ignoring any characters that are invalid.
Stu |
Quote:
PHP Code:
code: |
That method will never do unless you know the complete set of characters you have to remove. It would be simpler, as you say, to only include valid ASCII characters. A custom function is likely needed unless a solution already exists.
Stu |
| All times are GMT. The time now is 17:33. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.