I am accessing a MS SQL table where the customer name is in THAI Language.
When I download the data to sas dataset the characters are jumbled up.
How to show the Thai Language?
Try setting the LOCALE option in a SAS options statement before reading the MS SQL table:
Another thought: Thai fonts may need to be installed for the Thai characters to display correctly, like Angsana New for example.
I am using SAS 9.2
I tried the LOCALE SYSTEM OPTION but it did not work.
When you say Thai Fonts needs to be installed, what do you mean? Do I have to install it in windows?
It is my first time been asked to work on a database with foreign characters. I will have to read up more on INTERNATIONALIZATION, if this is the term.
I also noticed when I export from database to txt file it is garbled but when I export to XLS it is okay.
SAS uses NLS, National Language Support, to describe most of the issues around languages.
The text file viewer/editor likely uses a default font, for example mine is Courier, that interprets a unicode or double byte set incorrectly. XLS does allow additional font information.
Thai fonts need to be installed on the computer where Thai characters are to be displayed. The fact that it displays OK in Excel suggests that you do have Thai fonts installed. In the Excel spreadsheet where Thai characters are displaying correctly select a cell with correct Thai characters then check the font Excel is using in the task ribbon. What is the name of the font?
Also how are you viewing the SAS dataset with Thai customer names? Are you using Base SAS or EG as your SAS interface and what version are you using?
In excel the point is ARIAL.
I am using BASE SAS 9.2
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.