]> git.sur5r.net Git - openldap/blob - libraries/liblunicode/ucdata/ucdata.man
Cyrus SASL uses screwy terms.
[openldap] / libraries / liblunicode / ucdata / ucdata.man
1 .\"
2 .\" $Id: ucdata.man,v 1.4 1999/11/19 16:08:33 mleisher Exp $
3 .\"
4 .TH ucdata 3 "19 November 1999"
5 .SH NAME 
6 ucdata \- package for providing Unicode/ISO10646 character information
7
8 .SH SYNOPSIS
9 #include <ucdata.h>
10 .sp
11 void ucdata_load(char * paths, int masks)
12 .sp
13 void ucdata_unload(int masks)
14 .sp
15 void ucdata_reload(char * paths, int masks)
16 .sp
17 int ucdecomp(unsigned long code, unsigned long *num, unsigned long **decomp)
18 .sp
19 int ucdecomp_hangul(unsigned long code, unsigned long *num,
20 unsigned long decomp[])
21 .sp
22 .nf
23 struct ucnumber {
24   int numerator;
25   int denominator;
26 };
27 .sp
28 int ucnumber_lookup(unsigned long code, struct ucnumber *num)
29 .sp
30 int ucdigit_lookup(unsigned long code, int *digit)
31 .sp
32 struct ucnumber ucgetnumber(unsigned long code)
33 .sp
34 int ucgetdigit(unsigned long code)
35 .sp
36 unsigned long uctoupper(unsigned long code)
37 .sp
38 unsigned long uctolower(unsigned long code)
39 .sp
40 unsigned long uctotitle(unsigned long code)
41 .sp
42 int ucisalpha(unsigned long code)
43 .sp
44 int ucisalnum(unsigned long code)
45 .sp
46 int ucisdigit(unsigned long code)
47 .sp
48 int uciscntrl(unsigned long code)
49 .sp
50 int ucisspace(unsigned long code)
51 .sp
52 int ucisblank(unsigned long code)
53 .sp
54 int ucispunct(unsigned long code)
55 .sp
56 int ucisgraph(unsigned long code)
57 .sp
58 int ucisprint(unsigned long code)
59 .sp
60 int ucisxdigit(unsigned long code)
61 .sp
62 int ucisupper(unsigned long code)
63 .sp
64 int ucislower(unsigned long code)
65 .sp
66 int ucistitle(unsigned long code)
67 .sp
68 int ucisisocntrl(unsigned long code)
69 .sp
70 int ucisfmtcntrl(unsigned long code)
71 .sp
72 int ucissymbol(unsigned long code)
73 .sp
74 int ucisnumber(unsigned long code)
75 .sp
76 int ucisnonspacing(unsigned long code)
77 .sp
78 int ucisopenpunct(unsigned long code)
79 .sp
80 int ucisclosepunct(unsigned long code)
81 .sp
82 int ucisinitialpunct(unsigned long code)
83 .sp
84 int ucisfinalpunct(unsigned long code)
85 .sp
86 int uciscomposite(unsigned long code)
87 .sp
88 int ucisquote(unsigned long code)
89 .sp
90 int ucissymmetric(unsigned long code)
91 .sp
92 int ucismirroring(unsigned long code)
93 .sp
94 int ucisnonbreaking(unsigned long code)
95 .sp
96 int ucisrtl(unsigned long code)
97 .sp
98 int ucisltr(unsigned long code)
99 .sp
100 int ucisstrong(unsigned long code)
101 .sp
102 int ucisweak(unsigned long code)
103 .sp
104 int ucisneutral(unsigned long code)
105 .sp
106 int ucisseparator(unsigned long code)
107 .sp
108 int ucislsep(unsigned long code)
109 .sp
110 int ucispsep(unsigned long code)
111 .sp
112 int ucismark(unsigned long code)
113 .sp
114 int ucisnsmark(unsigned long code)
115 .sp
116 int ucisspmark(unsigned long code)
117 .sp
118 int ucismodif(unsigned long code)
119 .sp
120 int ucismodifsymbol(unsigned long code)
121 .sp
122 int ucisletnum(unsigned long code)
123 .sp
124 int ucisconnect(unsigned long code)
125 .sp
126 int ucisdash(unsigned long code)
127 .sp
128 int ucismath(unsigned long code)
129 .sp
130 int uciscurrency(unsigned long code)
131 .sp
132 int ucisenclosing(unsigned long code)
133 .sp
134 int ucisprivate(unsigned long code)
135 .sp
136 int ucissurrogate(unsigned long code)
137 .sp
138 int ucisidentstart(unsigned long code)
139 .sp
140 int ucisidentpart(unsigned long code)
141 .sp
142 int ucisdefined(unsigned long code)
143 .sp
144 int ucisundefined(unsigned long code)
145 .sp
146 int ucishan(unsigned long code)
147 .sp
148 int ucishangul(unsigned long code)
149
150 .SH DESCRIPTION
151 .TP 4
152 .BR Macros
153 .br
154 UCDATA_CASE
155 .br
156 UCDATA_CTYPE
157 .br
158 UCDATA_DECOMP
159 .br
160 UCDATA_CMBCL
161 .br
162 UCDATA_NUM
163 .br
164 UCDATA_ALL
165 .br
166 .TP 4
167 .BR ucdata_load()
168 This function initializes the UCData library by locating the data files in one
169 of the colon-separated directories in the `paths' parameter.  The data files
170 to be loaded are specified in the `masks' parameter as a bitwise combination
171 of the macros listed above.
172 .sp
173 This should be called before using any of the other functions.
174 .TP 4
175 .BR ucdata_unload()
176 This function unloads the data tables specified in the `masks' parameter.
177 .sp
178 This function should be called when the application is done using the UCData
179 package.
180 .TP 4
181 .BR ucdata_reload()
182 This function reloads the data files from one of the colon-separated
183 directories in the `paths' parameter.  The data files to be reloaded are
184 specified in the `masks' parameter as a bitwise combination of the macros
185 listed above.
186 .TP 4
187 .BR ucdecomp()
188 This function determines if a character has a decomposition and returns the
189 decomposition information if it exists.
190 .sp
191 If a zero is returned, there is no decomposition.  If a non-zero is
192 returned, then the `num' and `decomp' variables are filled in with the
193 appropriate values.
194 .sp
195 Example call:
196 .sp
197 .nf
198     unsigned long i, num, *decomp;
199
200     if (ucdecomp(0x1d5, &num, &decomp) != 0) {
201        for (i = 0; i < num; i++)
202          printf("0x%08lX,", decomp[i]);
203        putchar('\n');
204     }
205 .TP 4
206 .BR ucdecomp_hangul()
207 This function determines if a Hangul syllable has a
208 decomposition and returns the decomposition information.
209 .sp
210 An array of at least size 3 should be passed to the function
211 for the decomposition of the syllable.
212 .sp
213 If a zero is returned, the character is not a Hangul
214 syllable. If a non-zero is returned, the `num' field
215 will be 2 or 3 and the syllable will be decomposed into
216 the `decomp' array arithmetically.
217 .sp
218 Example call:
219 .sp
220 .nf
221     unsigned long i, num, decomp[3];
222
223     if (ucdecomp_hangul(0xb1ba, &num, &decomp) != 0) {
224        for (i = 0; i < num; i++)
225          printf("0x%08lX,", decomp[i]);
226        putchar('\n');
227     }
228 .TP 4
229 .BR ucnumber_lookup()
230 This function determines if the code is a number and
231 fills in the `num' field with the numerator and
232 denominator.  If the code happens to be a single digit,
233 the numerator and denominator fields will be the same.
234 .sp
235 If the function returns 0, the code is not a number.
236 Any other return value means the code is a number.
237 .TP 4
238 .BR ucdigit_lookup()
239 This function determines if the code is a digit and
240 fills in the `digit' field with the digit value.
241 .sp
242 If the function returns 0, the code is not a number.
243 Any other return value means the code is a number.
244 .TP 4
245 .BR ucgetnumber()
246 This is a compatibility function with John Cowan's
247 "uctype" package.  It uses ucnumber_lookup().
248 .TP 4
249 .BR ucgetdigit()
250 This is a compatibility function with John Cowan's
251 "uctype" package.  It uses ucdigit_lookup().
252 .TP 4
253 .BR uctoupper()
254 This function returns the code unchanged if it is
255 already upper case or has no upper case equivalent.
256 Otherwise the upper case equivalent is returned.
257 .TP 4
258 .BR uctolower()
259 This function returns the code unchanged if it is
260 already lower case or has no lower case equivalent.
261 Otherwise the lower case equivalent is returned.
262 .TP 4
263 .BR uctotitle()
264 This function returns the code unchanged if it is
265 already title case or has no title case equivalent.
266 Otherwise the title case equivalent is returned.
267 .TP 4
268 .BR ucisalpha()
269 Test if \fIcode\fR is an alpha character.
270 .TP 4
271 .BR ucisalnum()
272 Test if \fIcode\fR is an alpha or digit character.
273 .TP 4
274 .BR ucisdigit()
275 Test if \fIcode\fR is a digit character.
276 .TP 4
277 .BR uciscntrl()
278 Test if \fIcode\fR is a control character.
279 .TP 4
280 .BR ucisspace()
281 Test if \fIcode\fR is a space character.
282 .TP 4
283 .BR ucisblank()
284 Test if \fIcode\fR is a blank character.
285 .TP 4
286 .BR ucispunct()
287 Test if \fIcode\fR is a punctuation character.
288 .TP 4
289 .BR ucisgraph()
290 Test if \fIcode\fR is a graphical (visible) character.
291 .TP 4
292 .BR ucisprint()
293 Test if \fIcode\fR is a printable character.
294 .TP 4
295 .BR ucisxdigit()
296 Test if \fIcode\fR is a hexadecimal digit character.
297 .TP 4
298 .BR ucisupper()
299 Test if \fIcode\fR is an upper case character.
300 .TP 4
301 .BR ucislower()
302 Test if \fIcode\fR is a lower case character.
303 .TP 4
304 .BR ucistitle()
305 Test if \fIcode\fR is a title case character.
306 .TP 4
307 .BR ucisisocntrl()
308 Is the character a C0 control character (< 32)?
309 .TP 4
310 .BR ucisfmtcntrl()
311 Is the character a format control character?
312 .TP 4
313 .BR ucissymbol()
314 Is the character a symbol?
315 .TP 4
316 .BR ucisnumber()
317 Is the character a number or digit?
318 .TP 4
319 .BR ucisnonspacing()
320 Is the character non-spacing?
321 .TP 4
322 .BR ucisopenpunct()
323 Is the character an open/left punctuation (i.e. '[')
324 .TP 4
325 .BR ucisclosepunct()
326 Is the character an close/right punctuation (i.e. ']')
327 .TP 4
328 .BR ucisinitialpunct()
329 Is the character an initial punctuation (i.e. U+2018 LEFT
330 SINGLE QUOTATION MARK)
331 .TP 4
332 .BR ucisfinalpunct()
333 Is the character a final punctuation (i.e. U+2019 RIGHT
334 SINGLE QUOTATION MARK)
335 .TP 4
336 .BR uciscomposite()
337 Can the character be decomposed into a set of other
338 characters?
339 .TP 4
340 .BR ucisquote()
341 Is the character one of the many quotation marks?
342 .TP 4
343 .BR ucissymmetric()
344 Is the character one that has an opposite form
345 (i.e. <>)
346 .TP 4
347 .BR ucismirroring()
348 Is the character mirroring (superset of symmetric)?
349 .TP 4
350 .BR ucisnonbreaking()
351 Is the character non-breaking (i.e. non-breaking
352 space)?
353 .TP 4
354 .BR ucisrtl()
355 Does the character have strong right-to-left
356 directionality (i.e. Arabic letters)?
357 .TP 4
358 .BR ucisltr()
359 Does the character have strong left-to-right
360 directionality (i.e. Latin letters)?
361 .TP 4
362 .BR ucisstrong()
363 Does the character have strong directionality?
364 .TP 4
365 .BR ucisweak()
366 Does the character have weak directionality
367 (i.e. numbers)?
368 .TP 4
369 .BR ucisneutral()
370 Does the character have neutral directionality
371 (i.e. whitespace)?
372 .TP 4
373 .BR ucisseparator()
374 Is the character a block or segment separator?
375 .TP 4
376 .BR ucislsep()
377 Is the character a line separator?
378 .TP 4
379 .BR ucispsep()
380 Is the character a paragraph separator?
381 .TP 4
382 .BR ucismark()
383 Is the character a mark of some kind?
384 .TP 4
385 .BR ucisnsmark()
386 Is the character a non-spacing mark?
387 .TP 4
388 .BR ucisspmark()
389 Is the character a spacing mark?
390 .TP 4
391 .BR ucismodif()
392 Is the character a modifier letter?
393 .TP 4
394 .BR ucismodifsymbol()
395 Is the character a modifier symbol?
396 .TP 4
397 .BR ucisletnum()
398 Is the character a number represented by a letter?
399 .TP 4
400 .BR ucisconnect()
401 Is the character connecting punctuation?
402 .TP 4
403 .BR ucisdash()
404 Is the character dash punctuation?
405 .TP 4
406 .BR ucismath()
407 Is the character a math character?
408 .TP 4
409 .BR uciscurrency()
410 Is the character a currency character?
411 .TP 4
412 .BR ucisenclosing()
413 Is the character enclosing (i.e. enclosing box)?
414 .TP 4
415 .BR ucisprivate()
416 Is the character from the Private Use Area?
417 .TP 4
418 .BR ucissurrogate()
419 Is the character one of the surrogate codes?
420 .TP 4
421 .BR ucisidentstart()
422 Is the character a legal initial character of an identifier?
423 .TP 4
424 .BR ucisidentpart()
425 Is the character a legal identifier character?
426 .TP 4
427 .BR ucisdefined()
428 Is the character defined (appeared in one of the data
429 files)?
430 .TP 4
431 .BR ucisundefined()
432 Is the character not defined (non-Unicode)?
433 .TP 4
434 .BR ucishan()
435 Is the character a Han ideograph?
436 .TP 4
437 .BR ucishangul()
438 Is the character a pre-composed Hangul syllable?
439
440 .SH "SEE ALSO"
441 ctype(3)
442
443 .SH ACKNOWLEDGMENTS
444 These are people who have helped with patches or
445 alerted me about problems.
446 .sp
447 John Cowan <cowan@locke.ccil.org>
448 .br
449 Bob Verbrugge <bob_verbrugge@nl.compuware.com>
450 .br
451 Christophe Pierret <cpierret@businessobjects.com>
452 .br
453 Kent Johnson <kent@pondview.mv.com>
454 .br
455 Valeriy E. Ushakov <uwe@ptc.spbu.ru>
456
457 .SH AUTHOR
458 Mark Leisher
459 .br
460 Computing Research Lab
461 .br
462 New Mexico State University
463 .br
464 Email: mleisher@crl.nmsu.edu