Recently while working on a project, I had the requirement of uploading data containing Chinese, Thai, Vietnamese etc. characters in Salesforce. The data to be uploaded was available in Microsoft Excel format. However from Excel, when I tried to save the data in CSV format a lot characters where converted to ‘ ? ‘ (question mark) resulting into loss of characters. Excel does not allow you to specify the the encoding of the CSV file, which might have solved the problem.

After spending quite some time in looking for the solution (it wasn’t as straight forward as I had imagined) I came across a solution on Salesforce’s help site. The title of the article is ” How to import Asian characters from a CSV file into Salesforce ” and the Knowledge Article Number is ” 000004092 “, which worked quite nicely. So here is the solution given in this article

  1. Once you have the data in Excel format, save the file as ‘Unicode Text’ (this option is available in Excel)
  2. Open the file in notepad
  3. In Notepad, go to File, Save As …, then see if it has an option that says “File Encoding”. If it does, change the encoding to UTF-8. If it doesn’t have an option that says UTF-8, then you have an older version of Notepad that doesn’t support this option. Here you would end up saving as UTF-16 which Salesforce can also import.
  4. Ensure the filename has .csv for an extension in its name and the “Save as Type” has “All Files” in the dropdown box. Save the file.
  5. Start the Import Wizard in Salesforce and select your file to Import and the Encoding in the drop down list . This could be either in UTF-8 or UTF-16 format, depending on the selection you used when saving the CSV files.
  6. Import the file and check the results. This should work just fine.

¬†Even though the CSV file was not actually comma delimited (it was saved as tab delimited in step 1 where it was saved as ‘Unicode Text’) Salesforce was able to import it properly. So this works ….