I'm importing text documents into a java app and getting some different characters coming into a TextPane. When I open the files in wordpad/notepad they look like blank spaces, when I look at them at a dos prompt using the more function they look like the ascii symbol(225). In the text pane they end up looking like ascii symbol(127) -a box. At some point in time they "auto-magically" become question marks. I'd like to find a way to just strip them out when I load the file. I tried someString.replace('\127', '\0') that didn't work (I'm not sure thats the right way to reference an ascii char by its number.
The 127 symbol is often used for any character that cannot be displayed in the current character set - you don't want to know how many I see when visiting Japanese sites
But to answer your question about replacing: ASCII character 127 can be found / replaced by passing the integer 127. Characters are in fact 2 byte unsigned integer numbers, with the integer value matching the ASCII code for ASCII characters.
I'm trying to figure out how to filter these characters out of my strings and am not having any luck. I've tried the replace/replace all. I've tried writing the document out using different character encodings and am not having any luck. Anyone have any suggestions?