3

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

4
  • 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
    Commented Jul 13, 2016 at 7:12
  • just i want to convert Excel to csv with UTF-8 format, please send apex code. Commented 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 " Commented 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?
    – martin
    Commented Jul 13, 2016 at 9:50

1 Answer 1

4

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 .