SAS provides string functions and CALL routines that enable
you to easily manipulate your character data. Many of the original
SAS string functions assume that the size of one character is always
one byte. This process works well for data in a single-byte character
set (SBCS). However, when some of these functions and CALL routines
are used with data in a double-byte character set (DBCS) or multi-byte
character set (MBCS), the data is often handled improperly and produce
incorrect results.

DBCS encodings require
a varying number of bytes to represent each character. MBCS is sometimes
used as a synonym for DBCS.

To solve this problem SAS introduced a set of string
functions and CALL routines, called K functions, for those string
manipulations where DBCS and MBCS data must be handled carefully.
This page shows the level of I18N compatibility for each SAS string
function. I18N
is the abbreviation for internationalization. Compatibility indicates
whether a program using a particular string function can be adapted
to different languages and locales without program changes.

The user needs to understand
the difference between byte-based offset-length and character-based
offset-length in order to use the K functions properly. Most K functions
require the character-based offset or length. Under SBCS environments,
the byte-based unit is identical to character-based unit. However,
under DBCS or MBCS environment, there are significant differences,
and programmers need to distinguish them. The users might need to
change the programming logic in order to use the K functions. Most
K functions require strings encoded in current SAS session encoding.

String functions are
assigned I18N levels depending on whether the functions can process
DBCS, MBCS, or SBCS. Here are descriptions of the levels:

SAS String Functions

ANYALNUM Function in SAS Functions and CALL Routines: Reference | ||||

ANYALPHA Function in SAS Functions and CALL Routines: Reference | ||||

ANYCNTRL Function in SAS Functions and CALL Routines: Reference | ||||

ANYDIGIT Function in SAS Functions and CALL Routines: Reference | ||||

ANYFIRST Function in SAS Functions and CALL Routines: Reference | ||||

ANYGRAPH Function in SAS Functions and CALL Routines: Reference | ||||

ANYLOWER Function in SAS Functions and CALL Routines: Reference | ||||

ANYNAME Function in SAS Functions and CALL Routines: Reference | ||||

ANYPRINT Function in SAS Functions and CALL Routines: Reference | ||||

ANYPUNCT Function in SAS Functions and CALL Routines: Reference | ||||

ANYSPACE Function in SAS Functions and CALL Routines: Reference | ||||

ANYUPPER Function in SAS Functions and CALL Routines: Reference | ||||

ANYXDIGIT Function in SAS Functions and CALL Routines: Reference | ||||

BYTE Function in SAS Functions and CALL Routines: Reference | ||||

CAT Function in SAS Functions and CALL Routines: Reference | ||||

CATS Function in SAS Functions and CALL Routines: Reference | ||||

CATT Function in SAS Functions and CALL Routines: Reference | ||||

CATX Function in SAS Functions and CALL Routines: Reference | ||||

CHOOSEC Function in SAS Functions and CALL Routines: Reference | ||||

CHOOSEN Function in SAS Functions and CALL Routines: Reference | ||||

COALESCEC Function in SAS Functions and CALL Routines: Reference | ||||

COALESCEC Function in SAS Functions and CALL Routines: Reference | ||||

COMPARE Function in SAS Functions and CALL Routines: Reference | ||||

COMPARE Function in SAS Functions and CALL Routines: Reference | ||||

COMPGED Function in SAS Functions and CALL Routines: Reference | ||||

COMPLEV Function in SAS Functions and CALL Routines: Reference | ||||

COMPRESS Function in SAS Functions and CALL Routines: Reference | ||||

COUNT Function in SAS Functions and CALL Routines: Reference | ||||

COUNTC Function in SAS Functions and CALL Routines: Reference | ||||

DEQUOTE Function in SAS Functions and CALL Routines: Reference | ||||

FIND Function in SAS Functions and CALL Routines: Reference | ||||

FINDC Function in SAS Functions and CALL Routines: Reference | ||||

HTMLDECODE Function in SAS Functions and CALL Routines: Reference | ||||

HTMLENCODE Function in SAS Functions and CALL Routines: Reference | ||||

IFC Function in SAS Functions and CALL Routines: Reference | ||||

IFN Function in SAS Functions and CALL Routines: Reference | ||||

INDEX Function in SAS Functions and CALL Routines: Reference | ||||

INDEXC Function in SAS Functions and CALL Routines: Reference | ||||

INDEXW Function in SAS Functions and CALL Routines: Reference | ||||

KCOMPARE Function | ||||

KCOMPRESS Function | ||||

KCOUNT Function | ||||

KCVT Function | ||||

KINDEX Function | ||||

KINDEXC Function | ||||

KLEFT Function | ||||

KLENGTH Function | ||||

KLOWCASE Function | ||||

KREVERSE Function | ||||

KRIGHT Function | ||||

KSCAN Function | ||||

KSTRCAT Function | ||||

KSUBSTR Function | ||||

KSUBSTRB Function | ||||

KTRANSLATE Function | ||||

KTRIM Function | ||||

KTRUNCATE Function | ||||

KUPCASE Function | ||||

KUPDATE Function | ||||

KUPDATEB Function | ||||

KVERIFY Function | ||||

LEFT Function in SAS Functions and CALL Routines: Reference | ||||

LENGTH Function in SAS Functions and CALL Routines: Reference | ||||

LENGTHC Function in SAS Functions and CALL Routines: Reference | ||||

LENGTHM Function in SAS Functions and CALL Routines: Reference | ||||

LENGTHN Function in SAS Functions and CALL Routines: Reference | ||||

LOWCASE Function in SAS Functions and CALL Routines: Reference | ||||

MISSING Function in SAS Functions and CALL Routines: Reference | ||||

NLITERAL Function in SAS Functions and CALL Routines: Reference | ||||

NOTALNUM Function in SAS Functions and CALL Routines: Reference | ||||

NOTALPHA Function in SAS Functions and CALL Routines: Reference | ||||

NOTCNTRL Function in SAS Functions and CALL Routines: Reference | ||||

NOTDIGIT Function in SAS Functions and CALL Routines: Reference | ||||

NOTFIRST Function in SAS Functions and CALL Routines: Reference | ||||

NOTGRAPH Function in SAS Functions and CALL Routines: Reference | ||||

NOTLOWER Function in SAS Functions and CALL Routines: Reference | ||||

NOTNAME Function in SAS Functions and CALL Routines: Reference | ||||

NOTPRINT Function in SAS Functions and CALL Routines: Reference | ||||

NOTPUNCT Function in SAS Functions and CALL Routines: Reference | ||||

NOTSPACE Function in SAS Functions and CALL Routines: Reference | ||||

NOTUPPER Function in SAS Functions and CALL Routines: Reference | ||||

NOTXDIGIT Function in SAS Functions and CALL Routines: Reference | ||||

NVALID Function in SAS Functions and CALL Routines: Reference | ||||

PROPCASE Function in SAS Functions and CALL Routines: Reference | ||||

QUOTE Function in SAS Functions and CALL Routines: Reference | ||||

RANK Function in SAS Functions and CALL Routines: Reference | ||||

REPEAT Function in SAS Functions and CALL Routines: Reference | ||||

REVERSE Function in SAS Functions and CALL Routines: Reference | ||||

RIGHT Function in SAS Functions and CALL Routines: Reference | ||||

SCAN Function in SAS Functions and CALL Routines: Reference | ||||

SOUNDEX Function in SAS Functions and CALL Routines: Reference | ||||

SPEDIS Function in SAS Functions and CALL Routines: Reference | ||||

STRIP Function in SAS Functions and CALL Routines: Reference | ||||

SUBPAD Function in SAS Functions and CALL Routines: Reference | ||||

SUBSTR (left of =) Function in SAS Functions and CALL Routines: Reference | ||||

SUBSTRN Function in SAS Functions and CALL Routines: Reference | ||||

TRANSLATE Function in SAS Functions and CALL Routines: Reference | ||||

TRANWRD Function in SAS Functions and CALL Routines: Reference | ||||

TRIM Function in SAS Functions and CALL Routines: Reference | ||||

TRIMN Function in SAS Functions and CALL Routines: Reference | ||||

UPCASE Function in SAS Functions and CALL Routines: Reference | ||||

URLDECODE Function in SAS Functions and CALL Routines: Reference | ||||

URLENCODE Function in SAS Functions and CALL Routines: Reference | ||||

VERIFY Function in SAS Functions and CALL Routines: Reference |