2

How can one convert an Excel file into a UTF-8 encoded CSV?

  • 1
    UTF-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? – martin Jul 13 '16 at 7:12
  • just i want to convert Excel to csv with UTF-8 format, please send apex code. – Dudekula Guruvamsi Jul 13 '16 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 Guruvamsi Jul 13 '16 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? – martin Jul 13 '16 at 9:50
3

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);

Not the answer you're looking for? Browse other questions tagged or ask your own question.