How can one convert an Excel file into a UTF-8 encoded CSV?
-
1UTF-8 is not a format and txt is not a character encoding. It's entirely possible to have a plain-text file that is encoded as UTF-8. What are you trying to do exactly?– martinCommented Jul 13, 2016 at 7:12
-
just i want to convert Excel to csv with UTF-8 format, please send apex code.– Dudekula GuruvamsiCommented Jul 13, 2016 at 9:19
-
yes I want to this information " It's entirely possible to have a plain-text file that is encoded as UTF-8 "– Dudekula GuruvamsiCommented Jul 13, 2016 at 9:20
-
You mention Apex code in your comment. Are you trying to get the file changed into this format so you can use the Data Loader?– martinCommented Jul 13, 2016 at 9:50
Add a comment
|
1 Answer
Encode the String with UTF-8 format and Decode the same sting with UTF-8 format. For example:
String encoded = EncodingUtil.urlEncode('test 123', 'UTF-8');
system.debug(':::encoded::::'+encoded);
String decoded = EncodingUtil.urlDecode(encoded,'UTF-8');
system.debug(':::decoded::::'+decoded);