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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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