Special Characters Lost When Reading Text on the LG L600v
This is a strange device issue I came across today when loading localized text (FR and ES) for an application on the LG L600v.
What was observed on the application was a failure to display any special characters typically seen in French and Spanish text. Instead these (and often the next) characters were missed out.
The application used an InputStream to create an instance of InputStreamReader and parsed the text into a StringBuffer.
InputStreamReader isr = null;
StringBuffer buffer = null;
try {
is = getClass().getResourceAsStream( languageFileName );
isr = new InputStreamReader( is );
buffer = new StringBuffer();
int ch;
while( ( ch = isr.read() ) != -1 ) {
buffer.append( (char) ch );
}
}
This already is a little unusual as there is no need to create an instance of InputStreamReader as InputStream provides all the functionality needed. InputStreamReader is only required when a stream of bytes are required to be translated into characters according to a specified character encoding.
Unsurprisingly this is the cause of the issue and by simply removing the InputStreamReader instance the bug is fixed. Another method to add to the list that should not be used for portability!
Since writing, it has been found that the following devices are also affected
LG KU950
- FIN -
About this entry
You’re currently reading “Special Characters Lost When Reading Text on the LG L600v,” an entry on ReloadSystems
- Published:
- 04.10.07 / 4pm
- Category:
- Mobile/Cellular Devices, LG L600v
1 Comment
Jump to comment form | comments rss [?] | trackback uri [?]