1 /* gunicode.h - Unicode manipulation functions
3 * Copyright (C) 1999, 2000 Tom Tromey
4 * Copyright 2000, 2005 Red Hat, Inc.
6 * The Gnome Library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * The Gnome Library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with the Gnome Library; see the file COPYING.LIB. If not,
18 * see <http://www.gnu.org/licenses/>.
21 #ifndef __G_UNICODE_H__
22 #define __G_UNICODE_H__
24 #if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
25 #error "Only <glib.h> can be included directly."
28 #include <glib/gerror.h>
29 #include <glib/gtypes.h>
36 * A type which can hold any UTF-32 or UCS-4 character code,
37 * also known as a Unicode code point.
39 * If you want to produce the UTF-8 representation of a #gunichar,
40 * use g_ucs4_to_utf8(). See also g_utf8_to_ucs4() for the reverse
43 * To print/scan values of this type as integer, use
44 * %G_GINT32_MODIFIER and/or %G_GUINT32_FORMAT.
46 * The notation to express a Unicode code point in running text is
47 * as a hexadecimal number with four to six digits and uppercase
48 * letters, prefixed by the string "U+". Leading zeros are omitted,
49 * unless the code point would have fewer than four hexadecimal digits.
50 * For example, "U+0041 LATIN CAPITAL LETTER A". To print a code point
51 * in the U+-notation, use the format string "U+\%04"G_GINT32_FORMAT"X".
52 * To scan, use the format string "U+\%06"G_GINT32_FORMAT"X".
56 * sscanf ("U+0041", "U+%06"G_GINT32_FORMAT"X", &c)
57 * g_print ("Read U+%04"G_GINT32_FORMAT"X", c);
60 typedef guint32 gunichar;
65 * A type which can hold any UTF-16 code
66 * point<footnote id="utf16_surrogate_pairs">UTF-16 also has so called
67 * <firstterm>surrogate pairs</firstterm> to encode characters beyond
68 * the BMP as pairs of 16bit numbers. Surrogate pairs cannot be stored
69 * in a single gunichar2 field, but all GLib functions accepting gunichar2
70 * arrays will correctly interpret surrogate pairs.</footnote>.
72 * To print/scan values of this type to/from text you need to convert
73 * to/from UTF-8, using g_utf16_to_utf8()/g_utf8_to_utf16().
75 * To print/scan values of this type as integer, use
76 * %G_GINT16_MODIFIER and/or %G_GUINT16_FORMAT.
78 typedef guint16 gunichar2;
82 * @G_UNICODE_CONTROL: General category "Other, Control" (Cc)
83 * @G_UNICODE_FORMAT: General category "Other, Format" (Cf)
84 * @G_UNICODE_UNASSIGNED: General category "Other, Not Assigned" (Cn)
85 * @G_UNICODE_PRIVATE_USE: General category "Other, Private Use" (Co)
86 * @G_UNICODE_SURROGATE: General category "Other, Surrogate" (Cs)
87 * @G_UNICODE_LOWERCASE_LETTER: General category "Letter, Lowercase" (Ll)
88 * @G_UNICODE_MODIFIER_LETTER: General category "Letter, Modifier" (Lm)
89 * @G_UNICODE_OTHER_LETTER: General category "Letter, Other" (Lo)
90 * @G_UNICODE_TITLECASE_LETTER: General category "Letter, Titlecase" (Lt)
91 * @G_UNICODE_UPPERCASE_LETTER: General category "Letter, Uppercase" (Lu)
92 * @G_UNICODE_SPACING_MARK: General category "Mark, Spacing" (Mc)
93 * @G_UNICODE_ENCLOSING_MARK: General category "Mark, Enclosing" (Me)
94 * @G_UNICODE_NON_SPACING_MARK: General category "Mark, Nonspacing" (Mn)
95 * @G_UNICODE_DECIMAL_NUMBER: General category "Number, Decimal Digit" (Nd)
96 * @G_UNICODE_LETTER_NUMBER: General category "Number, Letter" (Nl)
97 * @G_UNICODE_OTHER_NUMBER: General category "Number, Other" (No)
98 * @G_UNICODE_CONNECT_PUNCTUATION: General category "Punctuation, Connector" (Pc)
99 * @G_UNICODE_DASH_PUNCTUATION: General category "Punctuation, Dash" (Pd)
100 * @G_UNICODE_CLOSE_PUNCTUATION: General category "Punctuation, Close" (Pe)
101 * @G_UNICODE_FINAL_PUNCTUATION: General category "Punctuation, Final quote" (Pf)
102 * @G_UNICODE_INITIAL_PUNCTUATION: General category "Punctuation, Initial quote" (Pi)
103 * @G_UNICODE_OTHER_PUNCTUATION: General category "Punctuation, Other" (Po)
104 * @G_UNICODE_OPEN_PUNCTUATION: General category "Punctuation, Open" (Ps)
105 * @G_UNICODE_CURRENCY_SYMBOL: General category "Symbol, Currency" (Sc)
106 * @G_UNICODE_MODIFIER_SYMBOL: General category "Symbol, Modifier" (Sk)
107 * @G_UNICODE_MATH_SYMBOL: General category "Symbol, Math" (Sm)
108 * @G_UNICODE_OTHER_SYMBOL: General category "Symbol, Other" (So)
109 * @G_UNICODE_LINE_SEPARATOR: General category "Separator, Line" (Zl)
110 * @G_UNICODE_PARAGRAPH_SEPARATOR: General category "Separator, Paragraph" (Zp)
111 * @G_UNICODE_SPACE_SEPARATOR: General category "Separator, Space" (Zs)
113 * These are the possible character classifications from the
114 * Unicode specification.
115 * See <ulink url="http://www.unicode.org/Public/UNIDATA/UnicodeData.html">http://www.unicode.org/Public/UNIDATA/UnicodeData.html</ulink>.
121 G_UNICODE_UNASSIGNED,
122 G_UNICODE_PRIVATE_USE,
124 G_UNICODE_LOWERCASE_LETTER,
125 G_UNICODE_MODIFIER_LETTER,
126 G_UNICODE_OTHER_LETTER,
127 G_UNICODE_TITLECASE_LETTER,
128 G_UNICODE_UPPERCASE_LETTER,
129 G_UNICODE_SPACING_MARK,
130 G_UNICODE_ENCLOSING_MARK,
131 G_UNICODE_NON_SPACING_MARK,
132 G_UNICODE_DECIMAL_NUMBER,
133 G_UNICODE_LETTER_NUMBER,
134 G_UNICODE_OTHER_NUMBER,
135 G_UNICODE_CONNECT_PUNCTUATION,
136 G_UNICODE_DASH_PUNCTUATION,
137 G_UNICODE_CLOSE_PUNCTUATION,
138 G_UNICODE_FINAL_PUNCTUATION,
139 G_UNICODE_INITIAL_PUNCTUATION,
140 G_UNICODE_OTHER_PUNCTUATION,
141 G_UNICODE_OPEN_PUNCTUATION,
142 G_UNICODE_CURRENCY_SYMBOL,
143 G_UNICODE_MODIFIER_SYMBOL,
144 G_UNICODE_MATH_SYMBOL,
145 G_UNICODE_OTHER_SYMBOL,
146 G_UNICODE_LINE_SEPARATOR,
147 G_UNICODE_PARAGRAPH_SEPARATOR,
148 G_UNICODE_SPACE_SEPARATOR
152 * G_UNICODE_COMBINING_MARK:
154 * Older name for %G_UNICODE_SPACING_MARK.
156 * Deprecated: 2.30: Use %G_UNICODE_SPACING_MARK.
158 #ifndef G_DISABLE_DEPRECATED
159 #define G_UNICODE_COMBINING_MARK G_UNICODE_SPACING_MARK
164 * @G_UNICODE_BREAK_MANDATORY: Mandatory Break (BK)
165 * @G_UNICODE_BREAK_CARRIAGE_RETURN: Carriage Return (CR)
166 * @G_UNICODE_BREAK_LINE_FEED: Line Feed (LF)
167 * @G_UNICODE_BREAK_COMBINING_MARK: Attached Characters and Combining Marks (CM)
168 * @G_UNICODE_BREAK_SURROGATE: Surrogates (SG)
169 * @G_UNICODE_BREAK_ZERO_WIDTH_SPACE: Zero Width Space (ZW)
170 * @G_UNICODE_BREAK_INSEPARABLE: Inseparable (IN)
171 * @G_UNICODE_BREAK_NON_BREAKING_GLUE: Non-breaking ("Glue") (GL)
172 * @G_UNICODE_BREAK_CONTINGENT: Contingent Break Opportunity (CB)
173 * @G_UNICODE_BREAK_SPACE: Space (SP)
174 * @G_UNICODE_BREAK_AFTER: Break Opportunity After (BA)
175 * @G_UNICODE_BREAK_BEFORE: Break Opportunity Before (BB)
176 * @G_UNICODE_BREAK_BEFORE_AND_AFTER: Break Opportunity Before and After (B2)
177 * @G_UNICODE_BREAK_HYPHEN: Hyphen (HY)
178 * @G_UNICODE_BREAK_NON_STARTER: Nonstarter (NS)
179 * @G_UNICODE_BREAK_OPEN_PUNCTUATION: Opening Punctuation (OP)
180 * @G_UNICODE_BREAK_CLOSE_PUNCTUATION: Closing Punctuation (CL)
181 * @G_UNICODE_BREAK_QUOTATION: Ambiguous Quotation (QU)
182 * @G_UNICODE_BREAK_EXCLAMATION: Exclamation/Interrogation (EX)
183 * @G_UNICODE_BREAK_IDEOGRAPHIC: Ideographic (ID)
184 * @G_UNICODE_BREAK_NUMERIC: Numeric (NU)
185 * @G_UNICODE_BREAK_INFIX_SEPARATOR: Infix Separator (Numeric) (IS)
186 * @G_UNICODE_BREAK_SYMBOL: Symbols Allowing Break After (SY)
187 * @G_UNICODE_BREAK_ALPHABETIC: Ordinary Alphabetic and Symbol Characters (AL)
188 * @G_UNICODE_BREAK_PREFIX: Prefix (Numeric) (PR)
189 * @G_UNICODE_BREAK_POSTFIX: Postfix (Numeric) (PO)
190 * @G_UNICODE_BREAK_COMPLEX_CONTEXT: Complex Content Dependent (South East Asian) (SA)
191 * @G_UNICODE_BREAK_AMBIGUOUS: Ambiguous (Alphabetic or Ideographic) (AI)
192 * @G_UNICODE_BREAK_UNKNOWN: Unknown (XX)
193 * @G_UNICODE_BREAK_NEXT_LINE: Next Line (NL)
194 * @G_UNICODE_BREAK_WORD_JOINER: Word Joiner (WJ)
195 * @G_UNICODE_BREAK_HANGUL_L_JAMO: Hangul L Jamo (JL)
196 * @G_UNICODE_BREAK_HANGUL_V_JAMO: Hangul V Jamo (JV)
197 * @G_UNICODE_BREAK_HANGUL_T_JAMO: Hangul T Jamo (JT)
198 * @G_UNICODE_BREAK_HANGUL_LV_SYLLABLE: Hangul LV Syllable (H2)
199 * @G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE: Hangul LVT Syllable (H3)
200 * @G_UNICODE_BREAK_CLOSE_PARANTHESIS: Closing Parenthesis (CP). Since 2.28
201 * @G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER: Conditional Japanese Starter (CJ). Since: 2.32
202 * @G_UNICODE_BREAK_HEBREW_LETTER: Hebrew Letter (HL). Since: 2.32
203 * @G_UNICODE_BREAK_REGIONAL_INDICATOR: Regional Indicator (RI). Since: 2.36
205 * These are the possible line break classifications.
207 * Since new unicode versions may add new types here, applications should be ready
208 * to handle unknown values. They may be regarded as %G_UNICODE_BREAK_UNKNOWN.
210 * See <ulink url="http://www.unicode.org/unicode/reports/tr14/">http://www.unicode.org/unicode/reports/tr14/</ulink>.
214 G_UNICODE_BREAK_MANDATORY,
215 G_UNICODE_BREAK_CARRIAGE_RETURN,
216 G_UNICODE_BREAK_LINE_FEED,
217 G_UNICODE_BREAK_COMBINING_MARK,
218 G_UNICODE_BREAK_SURROGATE,
219 G_UNICODE_BREAK_ZERO_WIDTH_SPACE,
220 G_UNICODE_BREAK_INSEPARABLE,
221 G_UNICODE_BREAK_NON_BREAKING_GLUE,
222 G_UNICODE_BREAK_CONTINGENT,
223 G_UNICODE_BREAK_SPACE,
224 G_UNICODE_BREAK_AFTER,
225 G_UNICODE_BREAK_BEFORE,
226 G_UNICODE_BREAK_BEFORE_AND_AFTER,
227 G_UNICODE_BREAK_HYPHEN,
228 G_UNICODE_BREAK_NON_STARTER,
229 G_UNICODE_BREAK_OPEN_PUNCTUATION,
230 G_UNICODE_BREAK_CLOSE_PUNCTUATION,
231 G_UNICODE_BREAK_QUOTATION,
232 G_UNICODE_BREAK_EXCLAMATION,
233 G_UNICODE_BREAK_IDEOGRAPHIC,
234 G_UNICODE_BREAK_NUMERIC,
235 G_UNICODE_BREAK_INFIX_SEPARATOR,
236 G_UNICODE_BREAK_SYMBOL,
237 G_UNICODE_BREAK_ALPHABETIC,
238 G_UNICODE_BREAK_PREFIX,
239 G_UNICODE_BREAK_POSTFIX,
240 G_UNICODE_BREAK_COMPLEX_CONTEXT,
241 G_UNICODE_BREAK_AMBIGUOUS,
242 G_UNICODE_BREAK_UNKNOWN,
243 G_UNICODE_BREAK_NEXT_LINE,
244 G_UNICODE_BREAK_WORD_JOINER,
245 G_UNICODE_BREAK_HANGUL_L_JAMO,
246 G_UNICODE_BREAK_HANGUL_V_JAMO,
247 G_UNICODE_BREAK_HANGUL_T_JAMO,
248 G_UNICODE_BREAK_HANGUL_LV_SYLLABLE,
249 G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE,
250 G_UNICODE_BREAK_CLOSE_PARANTHESIS,
251 G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER,
252 G_UNICODE_BREAK_HEBREW_LETTER,
253 G_UNICODE_BREAK_REGIONAL_INDICATOR
258 * @G_UNICODE_SCRIPT_INVALID_CODE:
259 * a value never returned from g_unichar_get_script()
260 * @G_UNICODE_SCRIPT_COMMON: a character used by multiple different scripts
261 * @G_UNICODE_SCRIPT_INHERITED: a mark glyph that takes its script from the
262 * i base glyph to which it is attached
263 * @G_UNICODE_SCRIPT_ARABIC: Arabic
264 * @G_UNICODE_SCRIPT_ARMENIAN: Armenian
265 * @G_UNICODE_SCRIPT_BENGALI: Bengali
266 * @G_UNICODE_SCRIPT_BOPOMOFO: Bopomofo
267 * @G_UNICODE_SCRIPT_CHEROKEE: Cherokee
268 * @G_UNICODE_SCRIPT_COPTIC: Coptic
269 * @G_UNICODE_SCRIPT_CYRILLIC: Cyrillic
270 * @G_UNICODE_SCRIPT_DESERET: Deseret
271 * @G_UNICODE_SCRIPT_DEVANAGARI: Devanagari
272 * @G_UNICODE_SCRIPT_ETHIOPIC: Ethiopic
273 * @G_UNICODE_SCRIPT_GEORGIAN: Georgian
274 * @G_UNICODE_SCRIPT_GOTHIC: Gothic
275 * @G_UNICODE_SCRIPT_GREEK: Greek
276 * @G_UNICODE_SCRIPT_GUJARATI: Gujarati
277 * @G_UNICODE_SCRIPT_GURMUKHI: Gurmukhi
278 * @G_UNICODE_SCRIPT_HAN: Han
279 * @G_UNICODE_SCRIPT_HANGUL: Hangul
280 * @G_UNICODE_SCRIPT_HEBREW: Hebrew
281 * @G_UNICODE_SCRIPT_HIRAGANA: Hiragana
282 * @G_UNICODE_SCRIPT_KANNADA: Kannada
283 * @G_UNICODE_SCRIPT_KATAKANA: Katakana
284 * @G_UNICODE_SCRIPT_KHMER: Khmer
285 * @G_UNICODE_SCRIPT_LAO: Lao
286 * @G_UNICODE_SCRIPT_LATIN: Latin
287 * @G_UNICODE_SCRIPT_MALAYALAM: Malayalam
288 * @G_UNICODE_SCRIPT_MONGOLIAN: Mongolian
289 * @G_UNICODE_SCRIPT_MYANMAR: Myanmar
290 * @G_UNICODE_SCRIPT_OGHAM: Ogham
291 * @G_UNICODE_SCRIPT_OLD_ITALIC: Old Italic
292 * @G_UNICODE_SCRIPT_ORIYA: Oriya
293 * @G_UNICODE_SCRIPT_RUNIC: Runic
294 * @G_UNICODE_SCRIPT_SINHALA: Sinhala
295 * @G_UNICODE_SCRIPT_SYRIAC: Syriac
296 * @G_UNICODE_SCRIPT_TAMIL: Tamil
297 * @G_UNICODE_SCRIPT_TELUGU: Telugu
298 * @G_UNICODE_SCRIPT_THAANA: Thaana
299 * @G_UNICODE_SCRIPT_THAI: Thai
300 * @G_UNICODE_SCRIPT_TIBETAN: Tibetan
301 * @G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL:
302 * Canadian Aboriginal
303 * @G_UNICODE_SCRIPT_YI: Yi
304 * @G_UNICODE_SCRIPT_TAGALOG: Tagalog
305 * @G_UNICODE_SCRIPT_HANUNOO: Hanunoo
306 * @G_UNICODE_SCRIPT_BUHID: Buhid
307 * @G_UNICODE_SCRIPT_TAGBANWA: Tagbanwa
308 * @G_UNICODE_SCRIPT_BRAILLE: Braille
309 * @G_UNICODE_SCRIPT_CYPRIOT: Cypriot
310 * @G_UNICODE_SCRIPT_LIMBU: Limbu
311 * @G_UNICODE_SCRIPT_OSMANYA: Osmanya
312 * @G_UNICODE_SCRIPT_SHAVIAN: Shavian
313 * @G_UNICODE_SCRIPT_LINEAR_B: Linear B
314 * @G_UNICODE_SCRIPT_TAI_LE: Tai Le
315 * @G_UNICODE_SCRIPT_UGARITIC: Ugaritic
316 * @G_UNICODE_SCRIPT_NEW_TAI_LUE:
318 * @G_UNICODE_SCRIPT_BUGINESE: Buginese
319 * @G_UNICODE_SCRIPT_GLAGOLITIC: Glagolitic
320 * @G_UNICODE_SCRIPT_TIFINAGH: Tifinagh
321 * @G_UNICODE_SCRIPT_SYLOTI_NAGRI:
323 * @G_UNICODE_SCRIPT_OLD_PERSIAN:
325 * @G_UNICODE_SCRIPT_KHAROSHTHI: Kharoshthi
326 * @G_UNICODE_SCRIPT_UNKNOWN: an unassigned code point
327 * @G_UNICODE_SCRIPT_BALINESE: Balinese
328 * @G_UNICODE_SCRIPT_CUNEIFORM: Cuneiform
329 * @G_UNICODE_SCRIPT_PHOENICIAN: Phoenician
330 * @G_UNICODE_SCRIPT_PHAGS_PA: Phags-pa
331 * @G_UNICODE_SCRIPT_NKO: N'Ko
332 * @G_UNICODE_SCRIPT_KAYAH_LI: Kayah Li. Since 2.16.3
333 * @G_UNICODE_SCRIPT_LEPCHA: Lepcha. Since 2.16.3
334 * @G_UNICODE_SCRIPT_REJANG: Rejang. Since 2.16.3
335 * @G_UNICODE_SCRIPT_SUNDANESE: Sundanese. Since 2.16.3
336 * @G_UNICODE_SCRIPT_SAURASHTRA: Saurashtra. Since 2.16.3
337 * @G_UNICODE_SCRIPT_CHAM: Cham. Since 2.16.3
338 * @G_UNICODE_SCRIPT_OL_CHIKI: Ol Chiki. Since 2.16.3
339 * @G_UNICODE_SCRIPT_VAI: Vai. Since 2.16.3
340 * @G_UNICODE_SCRIPT_CARIAN: Carian. Since 2.16.3
341 * @G_UNICODE_SCRIPT_LYCIAN: Lycian. Since 2.16.3
342 * @G_UNICODE_SCRIPT_LYDIAN: Lydian. Since 2.16.3
343 * @G_UNICODE_SCRIPT_AVESTAN: Avestan. Since 2.26
344 * @G_UNICODE_SCRIPT_BAMUM: Bamum. Since 2.26
345 * @G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS:
346 * Egyptian Hieroglpyhs. Since 2.26
347 * @G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC:
348 * Imperial Aramaic. Since 2.26
349 * @G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI:
350 * Inscriptional Pahlavi. Since 2.26
351 * @G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN:
352 * Inscriptional Parthian. Since 2.26
353 * @G_UNICODE_SCRIPT_JAVANESE: Javanese. Since 2.26
354 * @G_UNICODE_SCRIPT_KAITHI: Kaithi. Since 2.26
355 * @G_UNICODE_SCRIPT_LISU: Lisu. Since 2.26
356 * @G_UNICODE_SCRIPT_MEETEI_MAYEK:
357 * Meetei Mayek. Since 2.26
358 * @G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN:
359 * Old South Arabian. Since 2.26
360 * @G_UNICODE_SCRIPT_OLD_TURKIC: Old Turkic. Since 2.28
361 * @G_UNICODE_SCRIPT_SAMARITAN: Samaritan. Since 2.26
362 * @G_UNICODE_SCRIPT_TAI_THAM: Tai Tham. Since 2.26
363 * @G_UNICODE_SCRIPT_TAI_VIET: Tai Viet. Since 2.26
364 * @G_UNICODE_SCRIPT_BATAK: Batak. Since 2.28
365 * @G_UNICODE_SCRIPT_BRAHMI: Brahmi. Since 2.28
366 * @G_UNICODE_SCRIPT_MANDAIC: Mandaic. Since 2.28
367 * @G_UNICODE_SCRIPT_CHAKMA: Chakma. Since: 2.32
368 * @G_UNICODE_SCRIPT_MEROITIC_CURSIVE: Meroitic Cursive. Since: 2.32
369 * @G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS: Meroitic Hieroglyphs. Since: 2.32
370 * @G_UNICODE_SCRIPT_MIAO: Miao. Since: 2.32
371 * @G_UNICODE_SCRIPT_SHARADA: Sharada. Since: 2.32
372 * @G_UNICODE_SCRIPT_SORA_SOMPENG: Sora Sompeng. Since: 2.32
373 * @G_UNICODE_SCRIPT_TAKRI: Takri. Since: 2.32
374 * @G_UNICODE_SCRIPT_BASSA_VAH: Bassa. Since: 2.42
375 * @G_UNICODE_SCRIPT_CAUCASIAN_ALBANIAN: Caucasian Albanian. Since: 2.42
376 * @G_UNICODE_SCRIPT_DUPLOYAN: Duployan. Since: 2.42
377 * @G_UNICODE_SCRIPT_ELBASAN: Elbasan. Since: 2.42
378 * @G_UNICODE_SCRIPT_GRANTHA: Grantha. Since: 2.42
379 * @G_UNICODE_SCRIPT_KHOJKI: Kjohki. Since: 2.42
380 * @G_UNICODE_SCRIPT_KHUDAWADI: Khudawadi, Sindhi. Since: 2.42
381 * @G_UNICODE_SCRIPT_LINEAR_A: Linear A. Since: 2.42
382 * @G_UNICODE_SCRIPT_MAHAJANI: Mahajani. Since: 2.42
383 * @G_UNICODE_SCRIPT_MANICHAEAN: Manichaean. Since: 2.42
384 * @G_UNICODE_SCRIPT_MENDE_KIKAKUI: Mende Kikakui. Since: 2.42
385 * @G_UNICODE_SCRIPT_MODI: Modi. Since: 2.42
386 * @G_UNICODE_SCRIPT_MRO: Mro. Since: 2.42
387 * @G_UNICODE_SCRIPT_NABATAEAN: Nabataean. Since: 2.42
388 * @G_UNICODE_SCRIPT_OLD_NORTH_ARABIAN: Old North Arabian. Since: 2.42
389 * @G_UNICODE_SCRIPT_OLD_PERMIC: Old Permic. Since: 2.42
390 * @G_UNICODE_SCRIPT_PAHAWH_HMONG: Pahawh Hmong. Since: 2.42
391 * @G_UNICODE_SCRIPT_PALMYRENE: Palmyrene. Since: 2.42
392 * @G_UNICODE_SCRIPT_PAU_CIN_HAU: Pau Cin Hau. Since: 2.42
393 * @G_UNICODE_SCRIPT_PSALTER_PAHLAVI: Psalter Pahlavi. Since: 2.42
394 * @G_UNICODE_SCRIPT_SIDDHAM: Siddham. Since: 2.42
395 * @G_UNICODE_SCRIPT_TIRHUTA: Tirhuta. Since: 2.42
396 * @G_UNICODE_SCRIPT_WARANG_CITI Warang Citi. Since: 2.42
398 * The #GUnicodeScript enumeration identifies different writing
399 * systems. The values correspond to the names as defined in the
400 * Unicode standard. The enumeration has been added in GLib 2.14,
401 * and is interchangeable with #PangoScript.
403 * Note that new types may be added in the future. Applications
404 * should be ready to handle unknown values.
406 * url="http://www.unicode.org/reports/tr24/">Unicode Standard Annex
407 * #24: Script names</ulink>.
410 { /* ISO 15924 code */
411 G_UNICODE_SCRIPT_INVALID_CODE = -1,
412 G_UNICODE_SCRIPT_COMMON = 0, /* Zyyy */
413 G_UNICODE_SCRIPT_INHERITED, /* Zinh (Qaai) */
414 G_UNICODE_SCRIPT_ARABIC, /* Arab */
415 G_UNICODE_SCRIPT_ARMENIAN, /* Armn */
416 G_UNICODE_SCRIPT_BENGALI, /* Beng */
417 G_UNICODE_SCRIPT_BOPOMOFO, /* Bopo */
418 G_UNICODE_SCRIPT_CHEROKEE, /* Cher */
419 G_UNICODE_SCRIPT_COPTIC, /* Copt (Qaac) */
420 G_UNICODE_SCRIPT_CYRILLIC, /* Cyrl (Cyrs) */
421 G_UNICODE_SCRIPT_DESERET, /* Dsrt */
422 G_UNICODE_SCRIPT_DEVANAGARI, /* Deva */
423 G_UNICODE_SCRIPT_ETHIOPIC, /* Ethi */
424 G_UNICODE_SCRIPT_GEORGIAN, /* Geor (Geon, Geoa) */
425 G_UNICODE_SCRIPT_GOTHIC, /* Goth */
426 G_UNICODE_SCRIPT_GREEK, /* Grek */
427 G_UNICODE_SCRIPT_GUJARATI, /* Gujr */
428 G_UNICODE_SCRIPT_GURMUKHI, /* Guru */
429 G_UNICODE_SCRIPT_HAN, /* Hani */
430 G_UNICODE_SCRIPT_HANGUL, /* Hang */
431 G_UNICODE_SCRIPT_HEBREW, /* Hebr */
432 G_UNICODE_SCRIPT_HIRAGANA, /* Hira */
433 G_UNICODE_SCRIPT_KANNADA, /* Knda */
434 G_UNICODE_SCRIPT_KATAKANA, /* Kana */
435 G_UNICODE_SCRIPT_KHMER, /* Khmr */
436 G_UNICODE_SCRIPT_LAO, /* Laoo */
437 G_UNICODE_SCRIPT_LATIN, /* Latn (Latf, Latg) */
438 G_UNICODE_SCRIPT_MALAYALAM, /* Mlym */
439 G_UNICODE_SCRIPT_MONGOLIAN, /* Mong */
440 G_UNICODE_SCRIPT_MYANMAR, /* Mymr */
441 G_UNICODE_SCRIPT_OGHAM, /* Ogam */
442 G_UNICODE_SCRIPT_OLD_ITALIC, /* Ital */
443 G_UNICODE_SCRIPT_ORIYA, /* Orya */
444 G_UNICODE_SCRIPT_RUNIC, /* Runr */
445 G_UNICODE_SCRIPT_SINHALA, /* Sinh */
446 G_UNICODE_SCRIPT_SYRIAC, /* Syrc (Syrj, Syrn, Syre) */
447 G_UNICODE_SCRIPT_TAMIL, /* Taml */
448 G_UNICODE_SCRIPT_TELUGU, /* Telu */
449 G_UNICODE_SCRIPT_THAANA, /* Thaa */
450 G_UNICODE_SCRIPT_THAI, /* Thai */
451 G_UNICODE_SCRIPT_TIBETAN, /* Tibt */
452 G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL, /* Cans */
453 G_UNICODE_SCRIPT_YI, /* Yiii */
454 G_UNICODE_SCRIPT_TAGALOG, /* Tglg */
455 G_UNICODE_SCRIPT_HANUNOO, /* Hano */
456 G_UNICODE_SCRIPT_BUHID, /* Buhd */
457 G_UNICODE_SCRIPT_TAGBANWA, /* Tagb */
459 /* Unicode-4.0 additions */
460 G_UNICODE_SCRIPT_BRAILLE, /* Brai */
461 G_UNICODE_SCRIPT_CYPRIOT, /* Cprt */
462 G_UNICODE_SCRIPT_LIMBU, /* Limb */
463 G_UNICODE_SCRIPT_OSMANYA, /* Osma */
464 G_UNICODE_SCRIPT_SHAVIAN, /* Shaw */
465 G_UNICODE_SCRIPT_LINEAR_B, /* Linb */
466 G_UNICODE_SCRIPT_TAI_LE, /* Tale */
467 G_UNICODE_SCRIPT_UGARITIC, /* Ugar */
469 /* Unicode-4.1 additions */
470 G_UNICODE_SCRIPT_NEW_TAI_LUE, /* Talu */
471 G_UNICODE_SCRIPT_BUGINESE, /* Bugi */
472 G_UNICODE_SCRIPT_GLAGOLITIC, /* Glag */
473 G_UNICODE_SCRIPT_TIFINAGH, /* Tfng */
474 G_UNICODE_SCRIPT_SYLOTI_NAGRI, /* Sylo */
475 G_UNICODE_SCRIPT_OLD_PERSIAN, /* Xpeo */
476 G_UNICODE_SCRIPT_KHAROSHTHI, /* Khar */
478 /* Unicode-5.0 additions */
479 G_UNICODE_SCRIPT_UNKNOWN, /* Zzzz */
480 G_UNICODE_SCRIPT_BALINESE, /* Bali */
481 G_UNICODE_SCRIPT_CUNEIFORM, /* Xsux */
482 G_UNICODE_SCRIPT_PHOENICIAN, /* Phnx */
483 G_UNICODE_SCRIPT_PHAGS_PA, /* Phag */
484 G_UNICODE_SCRIPT_NKO, /* Nkoo */
486 /* Unicode-5.1 additions */
487 G_UNICODE_SCRIPT_KAYAH_LI, /* Kali */
488 G_UNICODE_SCRIPT_LEPCHA, /* Lepc */
489 G_UNICODE_SCRIPT_REJANG, /* Rjng */
490 G_UNICODE_SCRIPT_SUNDANESE, /* Sund */
491 G_UNICODE_SCRIPT_SAURASHTRA, /* Saur */
492 G_UNICODE_SCRIPT_CHAM, /* Cham */
493 G_UNICODE_SCRIPT_OL_CHIKI, /* Olck */
494 G_UNICODE_SCRIPT_VAI, /* Vaii */
495 G_UNICODE_SCRIPT_CARIAN, /* Cari */
496 G_UNICODE_SCRIPT_LYCIAN, /* Lyci */
497 G_UNICODE_SCRIPT_LYDIAN, /* Lydi */
499 /* Unicode-5.2 additions */
500 G_UNICODE_SCRIPT_AVESTAN, /* Avst */
501 G_UNICODE_SCRIPT_BAMUM, /* Bamu */
502 G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS, /* Egyp */
503 G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC, /* Armi */
504 G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI, /* Phli */
505 G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN, /* Prti */
506 G_UNICODE_SCRIPT_JAVANESE, /* Java */
507 G_UNICODE_SCRIPT_KAITHI, /* Kthi */
508 G_UNICODE_SCRIPT_LISU, /* Lisu */
509 G_UNICODE_SCRIPT_MEETEI_MAYEK, /* Mtei */
510 G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN, /* Sarb */
511 G_UNICODE_SCRIPT_OLD_TURKIC, /* Orkh */
512 G_UNICODE_SCRIPT_SAMARITAN, /* Samr */
513 G_UNICODE_SCRIPT_TAI_THAM, /* Lana */
514 G_UNICODE_SCRIPT_TAI_VIET, /* Tavt */
516 /* Unicode-6.0 additions */
517 G_UNICODE_SCRIPT_BATAK, /* Batk */
518 G_UNICODE_SCRIPT_BRAHMI, /* Brah */
519 G_UNICODE_SCRIPT_MANDAIC, /* Mand */
521 /* Unicode-6.1 additions */
522 G_UNICODE_SCRIPT_CHAKMA, /* Cakm */
523 G_UNICODE_SCRIPT_MEROITIC_CURSIVE, /* Merc */
524 G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS, /* Mero */
525 G_UNICODE_SCRIPT_MIAO, /* Plrd */
526 G_UNICODE_SCRIPT_SHARADA, /* Shrd */
527 G_UNICODE_SCRIPT_SORA_SOMPENG, /* Sora */
528 G_UNICODE_SCRIPT_TAKRI, /* Takr */
530 /* Unicode 7.0 additions */
531 G_UNICODE_SCRIPT_BASSA_VAH, /* Bass */
532 G_UNICODE_SCRIPT_CAUCASIAN_ALBANIAN, /* Aghb */
533 G_UNICODE_SCRIPT_DUPLOYAN, /* Dupl */
534 G_UNICODE_SCRIPT_ELBASAN, /* Elba */
535 G_UNICODE_SCRIPT_GRANTHA, /* Gran */
536 G_UNICODE_SCRIPT_KHOJKI, /* Khoj */
537 G_UNICODE_SCRIPT_KHUDAWADI, /* Sind */
538 G_UNICODE_SCRIPT_LINEAR_A, /* Lina */
539 G_UNICODE_SCRIPT_MAHAJANI, /* Mahj */
540 G_UNICODE_SCRIPT_MANICHAEAN, /* Manu */
541 G_UNICODE_SCRIPT_MENDE_KIKAKUI, /* Mend */
542 G_UNICODE_SCRIPT_MODI, /* Modi */
543 G_UNICODE_SCRIPT_MRO, /* Mroo */
544 G_UNICODE_SCRIPT_NABATAEAN, /* Nbat */
545 G_UNICODE_SCRIPT_OLD_NORTH_ARABIAN, /* Narb */
546 G_UNICODE_SCRIPT_OLD_PERMIC, /* Perm */
547 G_UNICODE_SCRIPT_PAHAWH_HMONG, /* Hmng */
548 G_UNICODE_SCRIPT_PALMYRENE, /* Palm */
549 G_UNICODE_SCRIPT_PAU_CIN_HAU, /* Pauc */
550 G_UNICODE_SCRIPT_PSALTER_PAHLAVI, /* Phlp */
551 G_UNICODE_SCRIPT_SIDDHAM, /* Sidd */
552 G_UNICODE_SCRIPT_TIRHUTA, /* Tirh */
553 G_UNICODE_SCRIPT_WARANG_CITI /* Wara */
556 GLIB_AVAILABLE_IN_ALL
557 guint32 g_unicode_script_to_iso15924 (GUnicodeScript script);
558 GLIB_AVAILABLE_IN_ALL
559 GUnicodeScript g_unicode_script_from_iso15924 (guint32 iso15924);
561 /* These are all analogs of the <ctype.h> functions.
563 GLIB_AVAILABLE_IN_ALL
564 gboolean g_unichar_isalnum (gunichar c) G_GNUC_CONST;
565 GLIB_AVAILABLE_IN_ALL
566 gboolean g_unichar_isalpha (gunichar c) G_GNUC_CONST;
567 GLIB_AVAILABLE_IN_ALL
568 gboolean g_unichar_iscntrl (gunichar c) G_GNUC_CONST;
569 GLIB_AVAILABLE_IN_ALL
570 gboolean g_unichar_isdigit (gunichar c) G_GNUC_CONST;
571 GLIB_AVAILABLE_IN_ALL
572 gboolean g_unichar_isgraph (gunichar c) G_GNUC_CONST;
573 GLIB_AVAILABLE_IN_ALL
574 gboolean g_unichar_islower (gunichar c) G_GNUC_CONST;
575 GLIB_AVAILABLE_IN_ALL
576 gboolean g_unichar_isprint (gunichar c) G_GNUC_CONST;
577 GLIB_AVAILABLE_IN_ALL
578 gboolean g_unichar_ispunct (gunichar c) G_GNUC_CONST;
579 GLIB_AVAILABLE_IN_ALL
580 gboolean g_unichar_isspace (gunichar c) G_GNUC_CONST;
581 GLIB_AVAILABLE_IN_ALL
582 gboolean g_unichar_isupper (gunichar c) G_GNUC_CONST;
583 GLIB_AVAILABLE_IN_ALL
584 gboolean g_unichar_isxdigit (gunichar c) G_GNUC_CONST;
585 GLIB_AVAILABLE_IN_ALL
586 gboolean g_unichar_istitle (gunichar c) G_GNUC_CONST;
587 GLIB_AVAILABLE_IN_ALL
588 gboolean g_unichar_isdefined (gunichar c) G_GNUC_CONST;
589 GLIB_AVAILABLE_IN_ALL
590 gboolean g_unichar_iswide (gunichar c) G_GNUC_CONST;
591 GLIB_AVAILABLE_IN_ALL
592 gboolean g_unichar_iswide_cjk(gunichar c) G_GNUC_CONST;
593 GLIB_AVAILABLE_IN_ALL
594 gboolean g_unichar_iszerowidth(gunichar c) G_GNUC_CONST;
595 GLIB_AVAILABLE_IN_ALL
596 gboolean g_unichar_ismark (gunichar c) G_GNUC_CONST;
598 /* More <ctype.h> functions. These convert between the three cases.
599 * See the Unicode book to understand title case. */
600 GLIB_AVAILABLE_IN_ALL
601 gunichar g_unichar_toupper (gunichar c) G_GNUC_CONST;
602 GLIB_AVAILABLE_IN_ALL
603 gunichar g_unichar_tolower (gunichar c) G_GNUC_CONST;
604 GLIB_AVAILABLE_IN_ALL
605 gunichar g_unichar_totitle (gunichar c) G_GNUC_CONST;
607 /* If C is a digit (according to 'g_unichar_isdigit'), then return its
608 numeric value. Otherwise return -1. */
609 GLIB_AVAILABLE_IN_ALL
610 gint g_unichar_digit_value (gunichar c) G_GNUC_CONST;
612 GLIB_AVAILABLE_IN_ALL
613 gint g_unichar_xdigit_value (gunichar c) G_GNUC_CONST;
615 /* Return the Unicode character type of a given character. */
616 GLIB_AVAILABLE_IN_ALL
617 GUnicodeType g_unichar_type (gunichar c) G_GNUC_CONST;
619 /* Return the line break property for a given character */
620 GLIB_AVAILABLE_IN_ALL
621 GUnicodeBreakType g_unichar_break_type (gunichar c) G_GNUC_CONST;
623 /* Returns the combining class for a given character */
624 GLIB_AVAILABLE_IN_ALL
625 gint g_unichar_combining_class (gunichar uc) G_GNUC_CONST;
627 GLIB_AVAILABLE_IN_ALL
628 gboolean g_unichar_get_mirror_char (gunichar ch,
629 gunichar *mirrored_ch);
631 GLIB_AVAILABLE_IN_ALL
632 GUnicodeScript g_unichar_get_script (gunichar ch) G_GNUC_CONST;
634 /* Validate a Unicode character */
635 GLIB_AVAILABLE_IN_ALL
636 gboolean g_unichar_validate (gunichar ch) G_GNUC_CONST;
638 /* Pairwise canonical compose/decompose */
639 GLIB_AVAILABLE_IN_ALL
640 gboolean g_unichar_compose (gunichar a,
643 GLIB_AVAILABLE_IN_ALL
644 gboolean g_unichar_decompose (gunichar ch,
648 GLIB_AVAILABLE_IN_ALL
649 gsize g_unichar_fully_decompose (gunichar ch,
655 * G_UNICHAR_MAX_DECOMPOSITION_LENGTH:
657 * The maximum length (in codepoints) of a compatibility or canonical
658 * decomposition of a single Unicode character.
660 * This is as defined by Unicode 6.1.
664 #define G_UNICHAR_MAX_DECOMPOSITION_LENGTH 18 /* codepoints */
666 /* Compute canonical ordering of a string in-place. This rearranges
667 decomposed characters in the string according to their combining
668 classes. See the Unicode manual for more information. */
669 GLIB_AVAILABLE_IN_ALL
670 void g_unicode_canonical_ordering (gunichar *string,
674 GLIB_DEPRECATED_IN_2_30
675 gunichar *g_unicode_canonical_decomposition (gunichar ch,
676 gsize *result_len) G_GNUC_MALLOC;
678 /* Array of skip-bytes-per-initial character.
680 GLIB_VAR const gchar * const g_utf8_skip;
684 * @p: Pointer to the start of a valid UTF-8 character
686 * Skips to the next character in a UTF-8 string. The string must be
687 * valid; this macro is as fast as possible, and has no error-checking.
688 * You would use this macro to iterate over a string character by
689 * character. The macro returns the start of the next UTF-8 character.
690 * Before using this macro, use g_utf8_validate() to validate strings
691 * that may contain invalid UTF-8.
693 #define g_utf8_next_char(p) (char *)((p) + g_utf8_skip[*(const guchar *)(p)])
695 GLIB_AVAILABLE_IN_ALL
696 gunichar g_utf8_get_char (const gchar *p) G_GNUC_PURE;
697 GLIB_AVAILABLE_IN_ALL
698 gunichar g_utf8_get_char_validated (const gchar *p,
699 gssize max_len) G_GNUC_PURE;
701 GLIB_AVAILABLE_IN_ALL
702 gchar* g_utf8_offset_to_pointer (const gchar *str,
703 glong offset) G_GNUC_PURE;
704 GLIB_AVAILABLE_IN_ALL
705 glong g_utf8_pointer_to_offset (const gchar *str,
706 const gchar *pos) G_GNUC_PURE;
707 GLIB_AVAILABLE_IN_ALL
708 gchar* g_utf8_prev_char (const gchar *p) G_GNUC_PURE;
709 GLIB_AVAILABLE_IN_ALL
710 gchar* g_utf8_find_next_char (const gchar *p,
711 const gchar *end) G_GNUC_PURE;
712 GLIB_AVAILABLE_IN_ALL
713 gchar* g_utf8_find_prev_char (const gchar *str,
714 const gchar *p) G_GNUC_PURE;
716 GLIB_AVAILABLE_IN_ALL
717 glong g_utf8_strlen (const gchar *p,
718 gssize max) G_GNUC_PURE;
720 GLIB_AVAILABLE_IN_2_30
721 gchar *g_utf8_substring (const gchar *str,
723 glong end_pos) G_GNUC_MALLOC;
725 GLIB_AVAILABLE_IN_ALL
726 gchar *g_utf8_strncpy (gchar *dest,
730 /* Find the UTF-8 character corresponding to ch, in string p. These
731 functions are equivalants to strchr and strrchr */
732 GLIB_AVAILABLE_IN_ALL
733 gchar* g_utf8_strchr (const gchar *p,
736 GLIB_AVAILABLE_IN_ALL
737 gchar* g_utf8_strrchr (const gchar *p,
740 GLIB_AVAILABLE_IN_ALL
741 gchar* g_utf8_strreverse (const gchar *str,
744 GLIB_AVAILABLE_IN_ALL
745 gunichar2 *g_utf8_to_utf16 (const gchar *str,
748 glong *items_written,
749 GError **error) G_GNUC_MALLOC;
750 GLIB_AVAILABLE_IN_ALL
751 gunichar * g_utf8_to_ucs4 (const gchar *str,
754 glong *items_written,
755 GError **error) G_GNUC_MALLOC;
756 GLIB_AVAILABLE_IN_ALL
757 gunichar * g_utf8_to_ucs4_fast (const gchar *str,
759 glong *items_written) G_GNUC_MALLOC;
760 GLIB_AVAILABLE_IN_ALL
761 gunichar * g_utf16_to_ucs4 (const gunichar2 *str,
764 glong *items_written,
765 GError **error) G_GNUC_MALLOC;
766 GLIB_AVAILABLE_IN_ALL
767 gchar* g_utf16_to_utf8 (const gunichar2 *str,
770 glong *items_written,
771 GError **error) G_GNUC_MALLOC;
772 GLIB_AVAILABLE_IN_ALL
773 gunichar2 *g_ucs4_to_utf16 (const gunichar *str,
776 glong *items_written,
777 GError **error) G_GNUC_MALLOC;
778 GLIB_AVAILABLE_IN_ALL
779 gchar* g_ucs4_to_utf8 (const gunichar *str,
782 glong *items_written,
783 GError **error) G_GNUC_MALLOC;
785 GLIB_AVAILABLE_IN_ALL
786 gint g_unichar_to_utf8 (gunichar c,
789 GLIB_AVAILABLE_IN_ALL
790 gboolean g_utf8_validate (const gchar *str,
794 GLIB_AVAILABLE_IN_ALL
795 gchar *g_utf8_strup (const gchar *str,
796 gssize len) G_GNUC_MALLOC;
797 GLIB_AVAILABLE_IN_ALL
798 gchar *g_utf8_strdown (const gchar *str,
799 gssize len) G_GNUC_MALLOC;
800 GLIB_AVAILABLE_IN_ALL
801 gchar *g_utf8_casefold (const gchar *str,
802 gssize len) G_GNUC_MALLOC;
806 * @G_NORMALIZE_DEFAULT: standardize differences that do not affect the
807 * text content, such as the above-mentioned accent representation
808 * @G_NORMALIZE_NFD: another name for %G_NORMALIZE_DEFAULT
809 * @G_NORMALIZE_DEFAULT_COMPOSE: like %G_NORMALIZE_DEFAULT, but with
810 * composed forms rather than a maximally decomposed form
811 * @G_NORMALIZE_NFC: another name for %G_NORMALIZE_DEFAULT_COMPOSE
812 * @G_NORMALIZE_ALL: beyond %G_NORMALIZE_DEFAULT also standardize the
813 * "compatibility" characters in Unicode, such as SUPERSCRIPT THREE
814 * to the standard forms (in this case DIGIT THREE). Formatting
815 * information may be lost but for most text operations such
816 * characters should be considered the same
817 * @G_NORMALIZE_NFKD: another name for %G_NORMALIZE_ALL
818 * @G_NORMALIZE_ALL_COMPOSE: like %G_NORMALIZE_ALL, but with composed
819 * forms rather than a maximally decomposed form
820 * @G_NORMALIZE_NFKC: another name for %G_NORMALIZE_ALL_COMPOSE
822 * Defines how a Unicode string is transformed in a canonical
823 * form, standardizing such issues as whether a character with
824 * an accent is represented as a base character and combining
825 * accent or as a single precomposed character. Unicode strings
826 * should generally be normalized before comparing them.
830 G_NORMALIZE_NFD = G_NORMALIZE_DEFAULT,
831 G_NORMALIZE_DEFAULT_COMPOSE,
832 G_NORMALIZE_NFC = G_NORMALIZE_DEFAULT_COMPOSE,
834 G_NORMALIZE_NFKD = G_NORMALIZE_ALL,
835 G_NORMALIZE_ALL_COMPOSE,
836 G_NORMALIZE_NFKC = G_NORMALIZE_ALL_COMPOSE
839 GLIB_AVAILABLE_IN_ALL
840 gchar *g_utf8_normalize (const gchar *str,
842 GNormalizeMode mode) G_GNUC_MALLOC;
844 GLIB_AVAILABLE_IN_ALL
845 gint g_utf8_collate (const gchar *str1,
846 const gchar *str2) G_GNUC_PURE;
847 GLIB_AVAILABLE_IN_ALL
848 gchar *g_utf8_collate_key (const gchar *str,
849 gssize len) G_GNUC_MALLOC;
850 GLIB_AVAILABLE_IN_ALL
851 gchar *g_utf8_collate_key_for_filename (const gchar *str,
852 gssize len) G_GNUC_MALLOC;
856 gchar *_g_utf8_make_valid (const gchar *name);
860 #endif /* __G_UNICODE_H__ */