BookmarkSubscribeRSS Feed
Tiaan
Calcite | Level 5

Hi,


I would like to analize incoming text and get their related UTF values.


For example the character 'GREEK SMALL LETTER ALPHA' has the following UTF values:

 

UTF-16 (hex) = 03b1

UTF-16 (decimal) = 945

 

Now I would like to get these values for every incoming character. Does SAS have something that can provide this?

 

 

Thanks!
Tiaan

1 REPLY 1
Ron_MacroMaven
Lapis Lazuli | Level 10

"Let me google that for you."

 

https://lmgtfy.com/  

 

$UCS2Lw. Format

Details
The $UCS2Lw. format writes a character string in little-endian, 16-bit, UCS2 (universal character set code in two octets), Unicode encoding. It processes character strings that are in the encoding of the current SAS session.
Comparisons
The $UCS2Lw. format performs processing that is the opposite of the $UCS2LEw. format.
Example
This example uses the Japanese Shift_JIS encoding, which is supported under the UNIX operating environment.
Statements
Result
 
----+----1
data_null;
x = ' xxx';
y=put(x,$ucs2l2.);
put y $hex.;
run;
2759
See Also
Informats:
 
waaay back in the 20th century we used to reply: RTFM
 
Ron Fehd  one of the Friendly Manual Readers
 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1475 views
  • 0 likes
  • 2 in conversation