Importing CSV made in iPhone application -


i making simple csv file in application, , use characters such 'æøå'. when open file on mac bbedit opens file correctly, if import file in excel (ms office 2011) unicode utf-8 not show characters correctly. how fix this?

some of code:

nsstring *tmppath = nstemporarydirectory(); nsstring *fullpath = [tmppath stringbyappendingpathcomponent:@"log_export.csv"]; [csvcomplete writetofile:fullpath atomically:yes encoding:nsutf8stringencoding error:null]; 

i mailing csv.

[mailcontroller addattachmentdata:data mimetype:@"text/csv" filename:@"sertifikat-loggbok.csv"]; 

csv text format not specify character encoding. different applications assume different encodings.

my experience microsoft excel assumes it's in default encoding happens cp1250 (similar iso 8859-1 / latin 1 encoding) on machine. maybe assumes cp1250.

so try switch utf-8 cp1250. cannot guarantee it'll work because there no encoding specified csv.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -