If you're a SAS programmer who works with international data that contain national characters, then you probably already understand the advantages of using SAS in a Unicode environment (UTF-8 encoding). Due to the global nature of data today, many SAS customers have moved to Unicode SAS for their work.
When text characters in data occupy more than one byte of storage each (true for languages like Chinese and Japanese), you must convert your use of byte-centric SAS functions to their multi-byte counterparts. You have to change your code to get the proper behavior in a Unicode session.
SAS Enterprise Guide has a tool that can help -- it's the SAS Code Analyzer for Internationalization. My colleague Junichi (@jpnjna) has written an article that shows how to use this tool to find code that you might need to change, as well as hard-coded strings to eliminate if you want to localize the text in your code.
Questions? Add a comment to the article!
Hi Chris,
One thing to remember is that, though "K functions" are very nice, not all transfers can go "smooth". My favorite "bad case" is scan() vs. kscan(), kscan() lacks the very nice fourth argument that scan() has, I mean the "modifier". Can't wait to have it in kscan().
All the best
Bart
Hi yabwon,
I think the "K" equivalent of scan() with four arguments is kscanx(). Try it.
Best Regards,
Artur
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.