BookmarkSubscribeRSS Feed
ChrisHemedinger
Community Manager

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!

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
3 REPLIES 3
yabwon
Onyx | Level 15

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

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



Artur_CandF
SAS Employee

Hi yabwon,

 

I think the "K" equivalent of scan() with four arguments is kscanx(). Try it.

 

Best Regards,

Artur

yabwon
Onyx | Level 15
Thanks! 🙂
Bart
_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 803 views
  • 3 likes
  • 3 in conversation