Export (Android/Java) string data in with extended characters for import into Excel -


i need export string data includes 'degrees' symbol ("\u00b0"). data exported csv text file utf-8 encoding. expected, degrees symbol encoded 2 characters (0xc2, 0xb0) within java (unicode) string. when csv file imported excel, displayed capital circumflex accent, followed degrees symbol.

i know "utf-8" supports 7-bit ascii (as single byte), not 8-bit "extended ascii", , "us-ascii" supports 7-bit ascii period.

is there way specify encoding such 0xc2 prefix byte suppressed?

i'm leaning toward allowing normal processing occur, reading & overwriting file contents, stripping byte.

i'd prefer more eloquent solution...

excel assumes csv files in 8-bit code page.

to excel parse csv utf-8, need add utf-8 byte order mark start of file.

edit:

if you're in western europe or us, excel use windows-1252 character set decoding , encoding when encountering files without unicode byte order mark.

as 0xc2 , 0xb0 both legal windows-1252 characters, excel decode following:

0xc2 = Â
0xb0 = °


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -