0

I am trying to import excel sheets that contain chinese characters into Stata 13.1. Following the guidelines at the following link: "Chinese Characters in Stata" I am able to get Chinese characters read in Stata. For example, I have .dta files which contain chinese characters and these are displayed correctly.The issue is that when I try and import excel sheets that contain chinese characters, these are imported as "????" - a string of question marks of varying lengths. Is their a way to solve this issue?

Note: I am using Windows 8.1 but I think the method in the link above still applies.

Community
  • 1
  • 1
user52932
  • 155
  • 10

1 Answers1

0

It sounds like an issue with your file and not so much with Stata. Chinese characters are often (if not always) encoded as UTF-8. It's possible that your Excel sheet didn't do this correctly. If you're not required to import from Excel directly, maybe try opening the file in Excel, saving the sheet as a "*.csv" (Comma Separated Values) file, and make sure to select the option which asks for UTF-8 encoding. Then use the insheet using "file.csv" , names to get the file in Stata with the first row made into variable names.

  • I tried to do this and encountered a couple of issues. In excel when I try to save as, I don't get a UTF-8 option. I still tried saving as a csv and the resulting csv contains question marks where the chinese characters should be (???????). I tried uploading the excel sheet to google docs and downloading the csv but even that csv had the question marks. – user52932 Aug 09 '15 at 20:38
  • Other people seem to be having the same problem:[here](http://stackoverflow.com/questions/4221176/excel-to-csv-with-utf8-encoding) I use LibreOffice, not Excel, so I'm not sure how to get the UTF-8 encoding if its not explicitly offered. In the above, LibreOffice is the second most voted up response in the above. If you can't get another copy of your Excel sheet with better encoding, maybe try downloading (LibreOffice)[http://www.libreoffice.org/download/libreoffice-fresh/], opening the Excel sheet in Calc, and then go to Save As->CSV, and make sure UTF-8 is checked. – Brian Albert Monroe Aug 09 '15 at 21:16