I need to export string data that includes the 'degrees' symbol ("\u00B0"). This data is exported as a csv text file with UTF-8 encoding. As would be expected, the degrees symbol is encoded as two characters (0xC2, 0xB0) within the java (unicode) string. When the CSV file is imported into Excel, it is displayed as a capital A with an circumflex accent, followed by the degrees symbol.
I know that "UTF-8" only supports 7-bit ASCII (as a single byte), not 8-bit "extended ASCII", and "US-ASCII" only supports 7-bit ASCII period.
Is there some way to specify encoding such that the 0xC2 prefix byte is suppressed?
I'm leaning toward allowing normal processing to occur, then reading & overwriting the file contents, stripping the extra byte.
I'd really prefer a more eloquent solution...