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
 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 1553 views
  • 0 likes
  • 2 in conversation