ID Number: Q50958
1.00 1.01 2.00
OS/2
Question:
What characters are acceptable in user and group names in OS/2 LAN
Manager? In trying to support the international market, we must
support extended ASCII characters. Also, the mapping of extended
characters is different for the Macintosh.
How do you handle foreign language characters in OS/2 LAN Manager,
specifically user and group names? I have tried creating names with an
umlauted "a", but my program crashes.
Response:
If you are using API calls such as NetUserAdd() or NetGroupAdd() (or
any API call that accepts a name parameter such as username,
groupname, password, computername, sharename, etc.), you must be sure
to convert all name characters to uppercase letters before making your
API call, including umlauted characters.
You should also note that the NET ADMIN interface does this
automatically for all ASCII characters (including umlauted "u", "a",
and "o" characters). For extended characters that don't have uppercase
equivalents (such as umlauted "e", "i", and variations on these
characters), standard uppercase characters are used. Since the
standard C run-time functions do not support uppercase conversion on
extended characters, you must provide these routines yourself before
calling OS/2 LAN Manager APIs.
Also, the Macintosh must conform to the standard IBM ASCII character
set to communicate with OS/2 LAN Manager.
Invalid Characters
------------------
The following characters are not valid in an OS/2 LAN Manager name
field such as username, groupname, and password:
ASCII characters 1 - 31 decimal, as well as the following:
. " / \ [ ] : | < > + = ; , ? *
Computernames disallow the "." (period), as well as the above
characters.
Uppercase Conversion
--------------------
Standard lowercase ASCII characters "a" - "z" are converted to their
uppercase equivalents "A" - "Z". The following is a list of NET ADMIN
uppercase conversions on the following extended ASCII characters:
ASCII Character Uppercase ASCII
Decimal -----> Character
--------------- ---------------
129 (umlauted "u") 154 umlauted "U"
130 e 69 standard "E"
131 a 65 standard "A"
132 (umlauted "a") 142 umlauted "A"
133 a 65 standard "A"
134 a 143 uppercase version of 134
135 128 uppercase version of 135
136 e 65 standard "A"
137 (umlauted "e") 69 standard "E" (no umlauted "E"
exists)
138 e 69 standard "E"
139 (umlauted "i") 73 standard "I" (no umlauted "I"
exists)
140 i 73 standard "I"
141 i 73 standard "I"
142 142 (no change)
143 143 (no change)
144 144 (no change)
145 146 uppercase version of 145
146 146 (no change)
147 o 79 standard "O"
148 (umlauted "o") 153 umlauted "O"
149 o 79 standard "O"
150 u 85 standard "U"
151 u 85 standard "U"
152 (umlauted "y") 89 standard "Y" (no umlauted "Y"
exists)
153 153 (no change)
154 154 (no change)
155 155 (no change)
156 156 (no change)
157 157 (no change)
158 158 (no change)
159 159 (no change)
160 a 65 standard "A"
161 i 73 standard "I"
162 o 79 standard "O"
163 u 85 standard "U"
164 n 165 uppercase version of 164
165 165 (no change)