summaryrefstree
path: root/usr/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html
blob: 1753c5bb6bb9facf200402e3e02442f6afa64bc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Unicode Manipulation</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GLib Reference Manual">
<link rel="up" href="glib-utilities.html" title="GLib Utilities">
<link rel="prev" href="glib-Character-Set-Conversion.html" title="Character Set Conversion">
<link rel="next" href="glib-Base64-Encoding.html" title="Base64 Encoding">
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="glib-Character-Set-Conversion.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="glib-utilities.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GLib Reference Manual</th>
<td><a accesskey="n" href="glib-Base64-Encoding.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#glib-Unicode-Manipulation.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#glib-Unicode-Manipulation.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="glib-Unicode-Manipulation"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="glib-Unicode-Manipulation.top_of_page"></a>Unicode Manipulation</span></h2>
<p>Unicode Manipulation — functions operating on Unicode characters and
    UTF-8 strings</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="glib-Unicode-Manipulation.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;glib.h&gt;

typedef             <a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar">gunichar</a>;
typedef             <a class="link" href="glib-Unicode-Manipulation.html#gunichar2" title="gunichar2">gunichar2</a>;

<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-validate" title="g_unichar_validate ()">g_unichar_validate</a>                  (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> ch</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-isalnum" title="g_unichar_isalnum ()">g_unichar_isalnum</a>                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-isalpha" title="g_unichar_isalpha ()">g_unichar_isalpha</a>                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-iscntrl" title="g_unichar_iscntrl ()">g_unichar_iscntrl</a>                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-isdefined" title="g_unichar_isdefined ()">g_unichar_isdefined</a>                 (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-isdigit" title="g_unichar_isdigit ()">g_unichar_isdigit</a>                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-isgraph" title="g_unichar_isgraph ()">g_unichar_isgraph</a>                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-islower" title="g_unichar_islower ()">g_unichar_islower</a>                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-ismark" title="g_unichar_ismark ()">g_unichar_ismark</a>                    (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-isprint" title="g_unichar_isprint ()">g_unichar_isprint</a>                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-ispunct" title="g_unichar_ispunct ()">g_unichar_ispunct</a>                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-isspace" title="g_unichar_isspace ()">g_unichar_isspace</a>                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-istitle" title="g_unichar_istitle ()">g_unichar_istitle</a>                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-isupper" title="g_unichar_isupper ()">g_unichar_isupper</a>                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-isxdigit" title="g_unichar_isxdigit ()">g_unichar_isxdigit</a>                  (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-iswide" title="g_unichar_iswide ()">g_unichar_iswide</a>                    (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-iswide-cjk" title="g_unichar_iswide_cjk ()">g_unichar_iswide_cjk</a>                (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-iszerowidth" title="g_unichar_iszerowidth ()">g_unichar_iszerowidth</a>               (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="returnvalue">gunichar</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-toupper" title="g_unichar_toupper ()">g_unichar_toupper</a>                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="returnvalue">gunichar</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-tolower" title="g_unichar_tolower ()">g_unichar_tolower</a>                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="returnvalue">gunichar</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-totitle" title="g_unichar_totitle ()">g_unichar_totitle</a>                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-digit-value" title="g_unichar_digit_value ()">g_unichar_digit_value</a>               (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-xdigit-value" title="g_unichar_xdigit_value ()">g_unichar_xdigit_value</a>              (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-compose" title="g_unichar_compose ()">g_unichar_compose</a>                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> a</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> b</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> *ch</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-decompose" title="g_unichar_decompose ()">g_unichar_decompose</a>                 (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> ch</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> *a</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> *b</code></em>);
<a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="returnvalue">gsize</span></a>               <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-fully-decompose" title="g_unichar_fully_decompose ()">g_unichar_fully_decompose</a>           (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> ch</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> compat</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> *result</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> result_len</code></em>);
#define             <a class="link" href="glib-Unicode-Manipulation.html#G-UNICHAR-MAX-DECOMPOSITION-LENGTH:CAPS" title="G_UNICHAR_MAX_DECOMPOSITION_LENGTH">G_UNICHAR_MAX_DECOMPOSITION_LENGTH</a>
enum                <a class="link" href="glib-Unicode-Manipulation.html#GUnicodeType" title="enum GUnicodeType">GUnicodeType</a>;
#define             <a class="link" href="glib-Unicode-Manipulation.html#G-UNICODE-COMBINING-MARK:CAPS" title="G_UNICODE_COMBINING_MARK">G_UNICODE_COMBINING_MARK</a>
<a class="link" href="glib-Unicode-Manipulation.html#GUnicodeType" title="enum GUnicodeType"><span class="returnvalue">GUnicodeType</span></a>        <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-type" title="g_unichar_type ()">g_unichar_type</a>                      (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
enum                <a class="link" href="glib-Unicode-Manipulation.html#GUnicodeBreakType" title="enum GUnicodeBreakType">GUnicodeBreakType</a>;
<a class="link" href="glib-Unicode-Manipulation.html#GUnicodeBreakType" title="enum GUnicodeBreakType"><span class="returnvalue">GUnicodeBreakType</span></a>   <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-break-type" title="g_unichar_break_type ()">g_unichar_break_type</a>                (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-combining-class" title="g_unichar_combining_class ()">g_unichar_combining_class</a>           (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> uc</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="glib-Unicode-Manipulation.html#g-unicode-canonical-ordering" title="g_unicode_canonical_ordering ()">g_unicode_canonical_ordering</a>        (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> *string</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> len</code></em>);
<a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="returnvalue">gunichar</span></a> *          <a class="link" href="glib-Unicode-Manipulation.html#g-unicode-canonical-decomposition" title="g_unicode_canonical_decomposition ()">g_unicode_canonical_decomposition</a>   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> ch</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> *result_len</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-get-mirror-char" title="g_unichar_get_mirror_char ()">g_unichar_get_mirror_char</a>           (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> ch</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> *mirrored_ch</code></em>);
enum                <a class="link" href="glib-Unicode-Manipulation.html#GUnicodeScript" title="enum GUnicodeScript">GUnicodeScript</a>;
<a class="link" href="glib-Unicode-Manipulation.html#GUnicodeScript" title="enum GUnicodeScript"><span class="returnvalue">GUnicodeScript</span></a>      <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-get-script" title="g_unichar_get_script ()">g_unichar_get_script</a>                (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> ch</code></em>);
<a class="link" href="glib-Unicode-Manipulation.html#GUnicodeScript" title="enum GUnicodeScript"><span class="returnvalue">GUnicodeScript</span></a>      <a class="link" href="glib-Unicode-Manipulation.html#g-unicode-script-from-iso15924" title="g_unicode_script_from_iso15924 ()">g_unicode_script_from_iso15924</a>      (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#guint32" title="guint32"><span class="type">guint32</span></a> iso15924</code></em>);
<a class="link" href="glib-Basic-Types.html#guint32" title="guint32"><span class="returnvalue">guint32</span></a>             <a class="link" href="glib-Unicode-Manipulation.html#g-unicode-script-to-iso15924" title="g_unicode_script_to_iso15924 ()">g_unicode_script_to_iso15924</a>        (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#GUnicodeScript" title="enum GUnicodeScript"><span class="type">GUnicodeScript</span></a> script</code></em>);

#define             <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-next-char" title="g_utf8_next_char()">g_utf8_next_char</a>                    (p)
<a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="returnvalue">gunichar</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-get-char" title="g_utf8_get_char ()">g_utf8_get_char</a>                     (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *p</code></em>);
<a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="returnvalue">gunichar</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-get-char-validated" title="g_utf8_get_char_validated ()">g_utf8_get_char_validated</a>           (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *p</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> max_len</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-offset-to-pointer" title="g_utf8_offset_to_pointer ()">g_utf8_offset_to_pointer</a>            (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> offset</code></em>);
<a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="returnvalue">glong</span></a>               <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-pointer-to-offset" title="g_utf8_pointer_to_offset ()">g_utf8_pointer_to_offset</a>            (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *pos</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-prev-char" title="g_utf8_prev_char ()">g_utf8_prev_char</a>                    (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *p</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-find-next-char" title="g_utf8_find_next_char ()">g_utf8_find_next_char</a>               (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *p</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *end</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-find-prev-char" title="g_utf8_find_prev_char ()">g_utf8_find_prev_char</a>               (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *p</code></em>);
<a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="returnvalue">glong</span></a>               <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-strlen" title="g_utf8_strlen ()">g_utf8_strlen</a>                       (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *p</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> max</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-strncpy" title="g_utf8_strncpy ()">g_utf8_strncpy</a>                      (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *dest</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *src</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> n</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-strchr" title="g_utf8_strchr ()">g_utf8_strchr</a>                       (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *p</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-strrchr" title="g_utf8_strrchr ()">g_utf8_strrchr</a>                      (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *p</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-strreverse" title="g_utf8_strreverse ()">g_utf8_strreverse</a>                   (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> len</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-substring" title="g_utf8_substring ()">g_utf8_substring</a>                    (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> start_pos</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> end_pos</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-validate" title="g_utf8_validate ()">g_utf8_validate</a>                     (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> max_len</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **end</code></em>);

<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-strup" title="g_utf8_strup ()">g_utf8_strup</a>                        (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> len</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-strdown" title="g_utf8_strdown ()">g_utf8_strdown</a>                      (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> len</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-casefold" title="g_utf8_casefold ()">g_utf8_casefold</a>                     (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> len</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-normalize" title="g_utf8_normalize ()">g_utf8_normalize</a>                    (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#GNormalizeMode" title="enum GNormalizeMode"><span class="type">GNormalizeMode</span></a> mode</code></em>);
enum                <a class="link" href="glib-Unicode-Manipulation.html#GNormalizeMode" title="enum GNormalizeMode">GNormalizeMode</a>;
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-collate" title="g_utf8_collate ()">g_utf8_collate</a>                      (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str1</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str2</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-collate-key" title="g_utf8_collate_key ()">g_utf8_collate_key</a>                  (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> len</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-collate-key-for-filename" title="g_utf8_collate_key_for_filename ()">g_utf8_collate_key_for_filename</a>     (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> len</code></em>);

<a class="link" href="glib-Unicode-Manipulation.html#gunichar2" title="gunichar2"><span class="returnvalue">gunichar2</span></a> *         <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-to-utf16" title="g_utf8_to_utf16 ()">g_utf8_to_utf16</a>                     (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_read</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_written</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="returnvalue">gunichar</span></a> *          <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-to-ucs4" title="g_utf8_to_ucs4 ()">g_utf8_to_ucs4</a>                      (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_read</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_written</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="returnvalue">gunichar</span></a> *          <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-to-ucs4-fast" title="g_utf8_to_ucs4_fast ()">g_utf8_to_ucs4_fast</a>                 (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_written</code></em>);
<a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="returnvalue">gunichar</span></a> *          <a class="link" href="glib-Unicode-Manipulation.html#g-utf16-to-ucs4" title="g_utf16_to_ucs4 ()">g_utf16_to_ucs4</a>                     (<em class="parameter"><code>const <a class="link" href="glib-Unicode-Manipulation.html#gunichar2" title="gunichar2"><span class="type">gunichar2</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_read</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_written</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="glib-Unicode-Manipulation.html#g-utf16-to-utf8" title="g_utf16_to_utf8 ()">g_utf16_to_utf8</a>                     (<em class="parameter"><code>const <a class="link" href="glib-Unicode-Manipulation.html#gunichar2" title="gunichar2"><span class="type">gunichar2</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_read</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_written</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Unicode-Manipulation.html#gunichar2" title="gunichar2"><span class="returnvalue">gunichar2</span></a> *         <a class="link" href="glib-Unicode-Manipulation.html#g-ucs4-to-utf16" title="g_ucs4_to_utf16 ()">g_ucs4_to_utf16</a>                     (<em class="parameter"><code>const <a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_read</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_written</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="glib-Unicode-Manipulation.html#g-ucs4-to-utf8" title="g_ucs4_to_utf8 ()">g_ucs4_to_utf8</a>                      (<em class="parameter"><code>const <a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_read</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_written</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-to-utf8" title="g_unichar_to_utf8 ()">g_unichar_to_utf8</a>                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *outbuf</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="glib-Unicode-Manipulation.description"></a><h2>Description</h2>
<p>
This section describes a number of functions for dealing with
Unicode characters and strings.  There are analogues of the
traditional <code class="filename">ctype.h</code> character classification
and case conversion functions, UTF-8 analogues of some string utility
functions, functions to perform normalization, case conversion and
collation on UTF-8 strings and finally functions to convert between
the UTF-8, UTF-16 and UCS-4 encodings of Unicode.
</p>
<p>
The implementations of the Unicode functions in GLib are based
on the Unicode Character Data tables, which are available from
<a class="ulink" href="http://www.unicode.org/" target="_top">www.unicode.org</a>.
GLib 2.8 supports Unicode 4.0, GLib 2.10 supports Unicode 4.1,
GLib 2.12 supports Unicode 5.0, GLib 2.16.3 supports Unicode 5.1,
GLib 2.30 supports Unicode 6.0.
</p>
</div>
<div class="refsect1">
<a name="glib-Unicode-Manipulation.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="gunichar"></a><h3>gunichar</h3>
<pre class="programlisting">typedef guint32 gunichar;
</pre>
<p>
A type which can hold any UTF-32 or UCS-4 character code,
also known as a Unicode code point.
</p>
<p>
If you want to produce the UTF-8 representation of a <a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a>,
use <a class="link" href="glib-Unicode-Manipulation.html#g-ucs4-to-utf8" title="g_ucs4_to_utf8 ()"><code class="function">g_ucs4_to_utf8()</code></a>. See also <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-to-ucs4" title="g_utf8_to_ucs4 ()"><code class="function">g_utf8_to_ucs4()</code></a> for the reverse
process.
</p>
<p>
To print/scan values of this type as integer, use
<a class="link" href="glib-Basic-Types.html#G-GINT32-MODIFIER:CAPS" title="G_GINT32_MODIFIER"><code class="literal">G_GINT32_MODIFIER</code></a> and/or <a class="link" href="glib-Basic-Types.html#G-GUINT32-FORMAT:CAPS" title="G_GUINT32_FORMAT"><code class="literal">G_GUINT32_FORMAT</code></a>.
</p>
<p>
The notation to express a Unicode code point in running text is
as a hexadecimal number with four to six digits and uppercase
letters, prefixed by the string "U+". Leading zeros are omitted,
unless the code point would have fewer than four hexadecimal digits.
For example, "U+0041 LATIN CAPITAL LETTER A". To print a code point
in the U+-notation, use the format string "U+%04"G_GINT32_FORMAT"X".
To scan, use the format string "U+%06"G_GINT32_FORMAT"X".
</p>
<p>
</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="usertype">gunichar</span><span class="normal"> c</span><span class="symbol">;</span>
<span class="function">sscanf</span><span class="normal"> </span><span class="symbol">(</span><span class="string">"U+0041"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"U+%06"</span><span class="normal"><a href="glib-Basic-Types.html#G-GINT32-FORMAT:CAPS">G_GINT32_FORMAT</a></span><span class="string">"X"</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">c</span><span class="symbol">)</span>
<span class="function"><a href="glib-Warnings-and-Assertions.html#g-print">g_print</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Read U+%04"</span><span class="normal"><a href="glib-Basic-Types.html#G-GINT32-FORMAT:CAPS">G_GINT32_FORMAT</a></span><span class="string">"X"</span><span class="symbol">,</span><span class="normal"> c</span><span class="symbol">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gunichar2"></a><h3>gunichar2</h3>
<pre class="programlisting">typedef guint16 gunichar2;
</pre>
<p>
A type which can hold any UTF-16 code
point<a href="#ftn.utf16_surrogate_pairs" class="footnote" name="utf16_surrogate_pairs"><sup class="footnote">[4]</sup></a>.
</p>
<p>
To print/scan values of this type to/from text you need to convert
to/from UTF-8, using <a class="link" href="glib-Unicode-Manipulation.html#g-utf16-to-utf8" title="g_utf16_to_utf8 ()"><code class="function">g_utf16_to_utf8()</code></a>/<a class="link" href="glib-Unicode-Manipulation.html#g-utf8-to-utf16" title="g_utf8_to_utf16 ()"><code class="function">g_utf8_to_utf16()</code></a>.
</p>
<p>
To print/scan values of this type as integer, use
<a class="link" href="glib-Basic-Types.html#G-GINT16-MODIFIER:CAPS" title="G_GINT16_MODIFIER"><code class="literal">G_GINT16_MODIFIER</code></a> and/or <a class="link" href="glib-Basic-Types.html#G-GUINT16-FORMAT:CAPS" title="G_GUINT16_FORMAT"><code class="literal">G_GUINT16_FORMAT</code></a>.
</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-validate"></a><h3>g_unichar_validate ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_validate                  (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> ch</code></em>);</pre>
<p>
Checks whether <em class="parameter"><code>ch</code></em> is a valid Unicode character. Some possible
integer values of <em class="parameter"><code>ch</code></em> will not be valid. 0 is considered a valid
character, though it's normally a string terminator.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>ch</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>ch</code></em> is a valid Unicode character</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-isalnum"></a><h3>g_unichar_isalnum ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_isalnum                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines whether a character is alphanumeric.
Given some UTF-8 text, obtain a character value
with <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-get-char" title="g_utf8_get_char ()"><code class="function">g_utf8_get_char()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is an alphanumeric character</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-isalpha"></a><h3>g_unichar_isalpha ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_isalpha                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines whether a character is alphabetic (i.e. a letter).
Given some UTF-8 text, obtain a character value with
<a class="link" href="glib-Unicode-Manipulation.html#g-utf8-get-char" title="g_utf8_get_char ()"><code class="function">g_utf8_get_char()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is an alphabetic character</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-iscntrl"></a><h3>g_unichar_iscntrl ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_iscntrl                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines whether a character is a control character.
Given some UTF-8 text, obtain a character value with
<a class="link" href="glib-Unicode-Manipulation.html#g-utf8-get-char" title="g_utf8_get_char ()"><code class="function">g_utf8_get_char()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is a control character</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-isdefined"></a><h3>g_unichar_isdefined ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_isdefined                 (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines if a given character is assigned in the Unicode
standard.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the character has an assigned value</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-isdigit"></a><h3>g_unichar_isdigit ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_isdigit                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines whether a character is numeric (i.e. a digit).  This
covers ASCII 0-9 and also digits in other languages/scripts.  Given
some UTF-8 text, obtain a character value with <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-get-char" title="g_utf8_get_char ()"><code class="function">g_utf8_get_char()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is a digit</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-isgraph"></a><h3>g_unichar_isgraph ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_isgraph                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines whether a character is printable and not a space
(returns <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> for control characters, format characters, and
spaces). <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-isprint" title="g_unichar_isprint ()"><code class="function">g_unichar_isprint()</code></a> is similar, but returns <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> for
spaces. Given some UTF-8 text, obtain a character value with
<a class="link" href="glib-Unicode-Manipulation.html#g-utf8-get-char" title="g_utf8_get_char ()"><code class="function">g_utf8_get_char()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is printable unless it's a space</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-islower"></a><h3>g_unichar_islower ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_islower                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines whether a character is a lowercase letter.
Given some UTF-8 text, obtain a character value with
<a class="link" href="glib-Unicode-Manipulation.html#g-utf8-get-char" title="g_utf8_get_char ()"><code class="function">g_utf8_get_char()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is a lowercase letter</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-ismark"></a><h3>g_unichar_ismark ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_ismark                    (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines whether a character is a mark (non-spacing mark,
combining mark, or enclosing mark in Unicode speak).
Given some UTF-8 text, obtain a character value
with <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-get-char" title="g_utf8_get_char ()"><code class="function">g_utf8_get_char()</code></a>.
</p>
<p>
Note: in most cases where isalpha characters are allowed,
ismark characters should be allowed to as they are essential
for writing most European languages as well as many non-Latin
scripts.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is a mark character</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-isprint"></a><h3>g_unichar_isprint ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_isprint                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines whether a character is printable.
Unlike <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-isgraph" title="g_unichar_isgraph ()"><code class="function">g_unichar_isgraph()</code></a>, returns <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> for spaces.
Given some UTF-8 text, obtain a character value with
<a class="link" href="glib-Unicode-Manipulation.html#g-utf8-get-char" title="g_utf8_get_char ()"><code class="function">g_utf8_get_char()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is printable</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-ispunct"></a><h3>g_unichar_ispunct ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_ispunct                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines whether a character is punctuation or a symbol.
Given some UTF-8 text, obtain a character value with
<a class="link" href="glib-Unicode-Manipulation.html#g-utf8-get-char" title="g_utf8_get_char ()"><code class="function">g_utf8_get_char()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is a punctuation or symbol character</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-isspace"></a><h3>g_unichar_isspace ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_isspace                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines whether a character is a space, tab, or line separator
(newline, carriage return, etc.).  Given some UTF-8 text, obtain a
character value with <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-get-char" title="g_utf8_get_char ()"><code class="function">g_utf8_get_char()</code></a>.
</p>
<p>
(Note: don't use this to do word breaking; you have to use
Pango or equivalent to get word breaking right, the algorithm
is fairly complex.)
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is a space character</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-istitle"></a><h3>g_unichar_istitle ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_istitle                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines if a character is titlecase. Some characters in
Unicode which are composites, such as the DZ digraph
have three case variants instead of just two. The titlecase
form is used at the beginning of a word where only the
first letter is capitalized. The titlecase form of the DZ
digraph is U+01F2 LATIN CAPITAL LETTTER D WITH SMALL LETTER Z.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the character is titlecase</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-isupper"></a><h3>g_unichar_isupper ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_isupper                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines if a character is uppercase.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>c</code></em> is an uppercase character</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-isxdigit"></a><h3>g_unichar_isxdigit ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_isxdigit                  (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines if a character is a hexidecimal digit.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the character is a hexadecimal digit</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-iswide"></a><h3>g_unichar_iswide ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_iswide                    (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines if a character is typically rendered in a double-width
cell.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the character is wide</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-iswide-cjk"></a><h3>g_unichar_iswide_cjk ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_iswide_cjk                (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines if a character is typically rendered in a double-width
cell under legacy East Asian locales.  If a character is wide according to
<a class="link" href="glib-Unicode-Manipulation.html#g-unichar-iswide" title="g_unichar_iswide ()"><code class="function">g_unichar_iswide()</code></a>, then it is also reported wide with this function, but
the converse is not necessarily true.  See the
<a class="ulink" href="http://www.unicode.org/reports/tr11/" target="_top">Unicode Standard
Annex #11</a> for details.
</p>
<p>
If a character passes the <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-iswide" title="g_unichar_iswide ()"><code class="function">g_unichar_iswide()</code></a> test then it will also pass
this test, but not the other way around.  Note that some characters may
pas both this test and <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-iszerowidth" title="g_unichar_iszerowidth ()"><code class="function">g_unichar_iszerowidth()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the character is wide in legacy East Asian locales</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.12</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-iszerowidth"></a><h3>g_unichar_iszerowidth ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_iszerowidth               (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines if a given character typically takes zero width when rendered.
The return value is <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> for all non-spacing and enclosing marks
(e.g., combining accents), format characters, zero-width
space, but not U+00AD SOFT HYPHEN.
</p>
<p>
A typical use of this function is with one of <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-iswide" title="g_unichar_iswide ()"><code class="function">g_unichar_iswide()</code></a> or
<a class="link" href="glib-Unicode-Manipulation.html#g-unichar-iswide-cjk" title="g_unichar_iswide_cjk ()"><code class="function">g_unichar_iswide_cjk()</code></a> to determine the number of cells a string occupies
when displayed on a grid display (terminals).  However, note that not all
terminals support zero-width rendering of zero-width marks.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the character has zero width</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-toupper"></a><h3>g_unichar_toupper ()</h3>
<pre class="programlisting"><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="returnvalue">gunichar</span></a>            g_unichar_toupper                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Converts a character to uppercase.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the result of converting <em class="parameter"><code>c</code></em> to uppercase.
If <em class="parameter"><code>c</code></em> is not an lowercase or titlecase character,
or has no upper case equivalent <em class="parameter"><code>c</code></em> is returned unchanged.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-tolower"></a><h3>g_unichar_tolower ()</h3>
<pre class="programlisting"><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="returnvalue">gunichar</span></a>            g_unichar_tolower                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Converts a character to lower case.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the result of converting <em class="parameter"><code>c</code></em> to lower case.
If <em class="parameter"><code>c</code></em> is not an upperlower or titlecase character,
or has no lowercase equivalent <em class="parameter"><code>c</code></em> is returned unchanged.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-totitle"></a><h3>g_unichar_totitle ()</h3>
<pre class="programlisting"><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="returnvalue">gunichar</span></a>            g_unichar_totitle                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Converts a character to the titlecase.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the result of converting <em class="parameter"><code>c</code></em> to titlecase.
If <em class="parameter"><code>c</code></em> is not an uppercase or lowercase character,
<em class="parameter"><code>c</code></em> is returned unchanged.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-digit-value"></a><h3>g_unichar_digit_value ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                g_unichar_digit_value               (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines the numeric value of a character as a decimal
digit.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>If <em class="parameter"><code>c</code></em> is a decimal digit (according to
<a class="link" href="glib-Unicode-Manipulation.html#g-unichar-isdigit" title="g_unichar_isdigit ()"><code class="function">g_unichar_isdigit()</code></a>), its numeric value. Otherwise, -1.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-xdigit-value"></a><h3>g_unichar_xdigit_value ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                g_unichar_xdigit_value              (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines the numeric value of a character as a hexidecimal
digit.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>If <em class="parameter"><code>c</code></em> is a hex digit (according to
<a class="link" href="glib-Unicode-Manipulation.html#g-unichar-isxdigit" title="g_unichar_isxdigit ()"><code class="function">g_unichar_isxdigit()</code></a>), its numeric value. Otherwise, -1.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-compose"></a><h3>g_unichar_compose ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_compose                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> a</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> b</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> *ch</code></em>);</pre>
<p>
Performs a single composition step of the
Unicode canonical composition algorithm.
</p>
<p>
This function includes algorithmic Hangul Jamo composition,
but it is not exactly the inverse of <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-decompose" title="g_unichar_decompose ()"><code class="function">g_unichar_decompose()</code></a>.
No composition can have either of <em class="parameter"><code>a</code></em> or <em class="parameter"><code>b</code></em> equal to zero.
To be precise, this function composes if and only if
there exists a Primary Composite P which is canonically
equivalent to the sequence &lt;<em class="parameter"><code>a</code></em>,<em class="parameter"><code>b</code></em>&gt;.  See the Unicode
Standard for the definition of Primary Composite.
</p>
<p>
If <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em> do not compose a new character, <em class="parameter"><code>ch</code></em> is set to zero.
</p>
<p>
See <a class="ulink" href="http://unicode.org/reports/tr15/" target="_top">UAX#15</a>
for details.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ch</code></em> :</span></p></td>
<td>return location for the composed character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the characters could be composed</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.30</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-decompose"></a><h3>g_unichar_decompose ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_decompose                 (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> ch</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> *a</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> *b</code></em>);</pre>
<p>
Performs a single decomposition step of the
Unicode canonical decomposition algorithm.
</p>
<p>
This function does not include compatibility
decompositions. It does, however, include algorithmic
Hangul Jamo decomposition, as well as 'singleton'
decompositions which replace a character by a single
other character. In the case of singletons *<em class="parameter"><code>b</code></em> will
be set to zero.
</p>
<p>
If <em class="parameter"><code>ch</code></em> is not decomposable, *<em class="parameter"><code>a</code></em> is set to <em class="parameter"><code>ch</code></em> and *<em class="parameter"><code>b</code></em>
is set to zero.
</p>
<p>
Note that the way Unicode decomposition pairs are
defined, it is guaranteed that <em class="parameter"><code>b</code></em> would not decompose
further, but <em class="parameter"><code>a</code></em> may itself decompose.  To get the full
canonical decomposition for <em class="parameter"><code>ch</code></em>, one would need to
recursively call this function on <em class="parameter"><code>a</code></em>.  Or use
<a class="link" href="glib-Unicode-Manipulation.html#g-unichar-fully-decompose" title="g_unichar_fully_decompose ()"><code class="function">g_unichar_fully_decompose()</code></a>.
</p>
<p>
See <a class="ulink" href="http://unicode.org/reports/tr15/" target="_top">UAX#15</a>
for details.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>ch</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td>return location for the first component of <em class="parameter"><code>ch</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
<td>return location for the second component of <em class="parameter"><code>ch</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the character could be decomposed</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.30</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-fully-decompose"></a><h3>g_unichar_fully_decompose ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="returnvalue">gsize</span></a>               g_unichar_fully_decompose           (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> ch</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> compat</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> *result</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> result_len</code></em>);</pre>
<p>
Computes the canonical or compatibility decomposition of a
Unicode character.  For compatibility decomposition,
pass <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> for <em class="parameter"><code>compat</code></em>; for canonical decomposition
pass <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> for <em class="parameter"><code>compat</code></em>.
</p>
<p>
The decomposed sequence is placed in <em class="parameter"><code>result</code></em>.  Only up to
<em class="parameter"><code>result_len</code></em> characters are written into <em class="parameter"><code>result</code></em>.  The length
of the full decomposition (irrespective of <em class="parameter"><code>result_len</code></em>) is
returned by the function.  For canonical decomposition,
currently all decompositions are of length at most 4, but
this may change in the future (very unlikely though).
At any rate, Unicode does guarantee that a buffer of length
18 is always enough for both compatibility and canonical
decompositions, so that is the size recommended. This is provided
as <a class="link" href="glib-Unicode-Manipulation.html#G-UNICHAR-MAX-DECOMPOSITION-LENGTH:CAPS" title="G_UNICHAR_MAX_DECOMPOSITION_LENGTH"><code class="literal">G_UNICHAR_MAX_DECOMPOSITION_LENGTH</code></a>.
</p>
<p>
See <a class="ulink" href="http://unicode.org/reports/tr15/" target="_top">UAX#15</a>
for details.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>ch</code></em> :</span></p></td>
<td>a Unicode character.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>compat</code></em> :</span></p></td>
<td>whether perform canonical or compatibility decomposition</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td>
<td>location to store decomposed result, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>result_len</code></em> :</span></p></td>
<td>length of <em class="parameter"><code>result</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the length of the full decomposition.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.30</p>
</div>
<hr>
<div class="refsect2">
<a name="G-UNICHAR-MAX-DECOMPOSITION-LENGTH:CAPS"></a><h3>G_UNICHAR_MAX_DECOMPOSITION_LENGTH</h3>
<pre class="programlisting">#define G_UNICHAR_MAX_DECOMPOSITION_LENGTH 18 /* codepoints */
</pre>
<p>
The maximum length (in codepoints) of a compatibility or canonical
decomposition of a single Unicode character.
</p>
<p>
This is as defined by Unicode 6.1.
</p>
<p class="since">Since 2.32</p>
</div>
<hr>
<div class="refsect2">
<a name="GUnicodeType"></a><h3>enum GUnicodeType</h3>
<pre class="programlisting">typedef enum {
  G_UNICODE_CONTROL,
  G_UNICODE_FORMAT,
  G_UNICODE_UNASSIGNED,
  G_UNICODE_PRIVATE_USE,
  G_UNICODE_SURROGATE,
  G_UNICODE_LOWERCASE_LETTER,
  G_UNICODE_MODIFIER_LETTER,
  G_UNICODE_OTHER_LETTER,
  G_UNICODE_TITLECASE_LETTER,
  G_UNICODE_UPPERCASE_LETTER,
  G_UNICODE_SPACING_MARK,
  G_UNICODE_ENCLOSING_MARK,
  G_UNICODE_NON_SPACING_MARK,
  G_UNICODE_DECIMAL_NUMBER,
  G_UNICODE_LETTER_NUMBER,
  G_UNICODE_OTHER_NUMBER,
  G_UNICODE_CONNECT_PUNCTUATION,
  G_UNICODE_DASH_PUNCTUATION,
  G_UNICODE_CLOSE_PUNCTUATION,
  G_UNICODE_FINAL_PUNCTUATION,
  G_UNICODE_INITIAL_PUNCTUATION,
  G_UNICODE_OTHER_PUNCTUATION,
  G_UNICODE_OPEN_PUNCTUATION,
  G_UNICODE_CURRENCY_SYMBOL,
  G_UNICODE_MODIFIER_SYMBOL,
  G_UNICODE_MATH_SYMBOL,
  G_UNICODE_OTHER_SYMBOL,
  G_UNICODE_LINE_SEPARATOR,
  G_UNICODE_PARAGRAPH_SEPARATOR,
  G_UNICODE_SPACE_SEPARATOR
} GUnicodeType;
</pre>
<p>
These are the possible character classifications from the
Unicode specification.
See <a class="ulink" href="http://www.unicode.org/Public/UNIDATA/UnicodeData.html" target="_top">http://www.unicode.org/Public/UNIDATA/UnicodeData.html</a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="G-UNICODE-CONTROL:CAPS"></a><span class="term"><code class="literal">G_UNICODE_CONTROL</code></span></p></td>
<td>General category "Other, Control" (Cc)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-FORMAT:CAPS"></a><span class="term"><code class="literal">G_UNICODE_FORMAT</code></span></p></td>
<td>General category "Other, Format" (Cf)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-UNASSIGNED:CAPS"></a><span class="term"><code class="literal">G_UNICODE_UNASSIGNED</code></span></p></td>
<td>General category "Other, Not Assigned" (Cn)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-PRIVATE-USE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_PRIVATE_USE</code></span></p></td>
<td>General category "Other, Private Use" (Co)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SURROGATE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SURROGATE</code></span></p></td>
<td>General category "Other, Surrogate" (Cs)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-LOWERCASE-LETTER:CAPS"></a><span class="term"><code class="literal">G_UNICODE_LOWERCASE_LETTER</code></span></p></td>
<td>General category "Letter, Lowercase" (Ll)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-MODIFIER-LETTER:CAPS"></a><span class="term"><code class="literal">G_UNICODE_MODIFIER_LETTER</code></span></p></td>
<td>General category "Letter, Modifier" (Lm)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-OTHER-LETTER:CAPS"></a><span class="term"><code class="literal">G_UNICODE_OTHER_LETTER</code></span></p></td>
<td>General category "Letter, Other" (Lo)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-TITLECASE-LETTER:CAPS"></a><span class="term"><code class="literal">G_UNICODE_TITLECASE_LETTER</code></span></p></td>
<td>General category "Letter, Titlecase" (Lt)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-UPPERCASE-LETTER:CAPS"></a><span class="term"><code class="literal">G_UNICODE_UPPERCASE_LETTER</code></span></p></td>
<td>General category "Letter, Uppercase" (Lu)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SPACING-MARK:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SPACING_MARK</code></span></p></td>
<td>General category "Mark, Spacing" (Mc)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-ENCLOSING-MARK:CAPS"></a><span class="term"><code class="literal">G_UNICODE_ENCLOSING_MARK</code></span></p></td>
<td>General category "Mark, Enclosing" (Me)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-NON-SPACING-MARK:CAPS"></a><span class="term"><code class="literal">G_UNICODE_NON_SPACING_MARK</code></span></p></td>
<td>General category "Mark, Nonspacing" (Mn)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-DECIMAL-NUMBER:CAPS"></a><span class="term"><code class="literal">G_UNICODE_DECIMAL_NUMBER</code></span></p></td>
<td>General category "Number, Decimal Digit" (Nd)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-LETTER-NUMBER:CAPS"></a><span class="term"><code class="literal">G_UNICODE_LETTER_NUMBER</code></span></p></td>
<td>General category "Number, Letter" (Nl)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-OTHER-NUMBER:CAPS"></a><span class="term"><code class="literal">G_UNICODE_OTHER_NUMBER</code></span></p></td>
<td>General category "Number, Other" (No)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-CONNECT-PUNCTUATION:CAPS"></a><span class="term"><code class="literal">G_UNICODE_CONNECT_PUNCTUATION</code></span></p></td>
<td>General category "Punctuation, Connector" (Pc)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-DASH-PUNCTUATION:CAPS"></a><span class="term"><code class="literal">G_UNICODE_DASH_PUNCTUATION</code></span></p></td>
<td>General category "Punctuation, Dash" (Pd)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-CLOSE-PUNCTUATION:CAPS"></a><span class="term"><code class="literal">G_UNICODE_CLOSE_PUNCTUATION</code></span></p></td>
<td>General category "Punctuation, Close" (Pe)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-FINAL-PUNCTUATION:CAPS"></a><span class="term"><code class="literal">G_UNICODE_FINAL_PUNCTUATION</code></span></p></td>
<td>General category "Punctuation, Final quote" (Pf)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-INITIAL-PUNCTUATION:CAPS"></a><span class="term"><code class="literal">G_UNICODE_INITIAL_PUNCTUATION</code></span></p></td>
<td>General category "Punctuation, Initial quote" (Pi)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-OTHER-PUNCTUATION:CAPS"></a><span class="term"><code class="literal">G_UNICODE_OTHER_PUNCTUATION</code></span></p></td>
<td>General category "Punctuation, Other" (Po)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-OPEN-PUNCTUATION:CAPS"></a><span class="term"><code class="literal">G_UNICODE_OPEN_PUNCTUATION</code></span></p></td>
<td>General category "Punctuation, Open" (Ps)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-CURRENCY-SYMBOL:CAPS"></a><span class="term"><code class="literal">G_UNICODE_CURRENCY_SYMBOL</code></span></p></td>
<td>General category "Symbol, Currency" (Sc)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-MODIFIER-SYMBOL:CAPS"></a><span class="term"><code class="literal">G_UNICODE_MODIFIER_SYMBOL</code></span></p></td>
<td>General category "Symbol, Modifier" (Sk)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-MATH-SYMBOL:CAPS"></a><span class="term"><code class="literal">G_UNICODE_MATH_SYMBOL</code></span></p></td>
<td>General category "Symbol, Math" (Sm)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-OTHER-SYMBOL:CAPS"></a><span class="term"><code class="literal">G_UNICODE_OTHER_SYMBOL</code></span></p></td>
<td>General category "Symbol, Other" (So)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-LINE-SEPARATOR:CAPS"></a><span class="term"><code class="literal">G_UNICODE_LINE_SEPARATOR</code></span></p></td>
<td>General category "Separator, Line" (Zl)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-PARAGRAPH-SEPARATOR:CAPS"></a><span class="term"><code class="literal">G_UNICODE_PARAGRAPH_SEPARATOR</code></span></p></td>
<td>General category "Separator, Paragraph" (Zp)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SPACE-SEPARATOR:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SPACE_SEPARATOR</code></span></p></td>
<td>General category "Separator, Space" (Zs)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="G-UNICODE-COMBINING-MARK:CAPS"></a><h3>G_UNICODE_COMBINING_MARK</h3>
<pre class="programlisting">#define G_UNICODE_COMBINING_MARK G_UNICODE_SPACING_MARK
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">G_UNICODE_COMBINING_MARK</code> has been deprecated since version 2.30 and should not be used in newly-written code. Use <a class="link" href="glib-Unicode-Manipulation.html#G-UNICODE-SPACING-MARK:CAPS"><code class="literal">G_UNICODE_SPACING_MARK</code></a>.</p>
</div>
<p>
Older name for <a class="link" href="glib-Unicode-Manipulation.html#G-UNICODE-SPACING-MARK:CAPS"><code class="literal">G_UNICODE_SPACING_MARK</code></a>.
</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-type"></a><h3>g_unichar_type ()</h3>
<pre class="programlisting"><a class="link" href="glib-Unicode-Manipulation.html#GUnicodeType" title="enum GUnicodeType"><span class="returnvalue">GUnicodeType</span></a>        g_unichar_type                      (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Classifies a Unicode character by type.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the type of the character.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GUnicodeBreakType"></a><h3>enum GUnicodeBreakType</h3>
<pre class="programlisting">typedef enum {
  G_UNICODE_BREAK_MANDATORY,
  G_UNICODE_BREAK_CARRIAGE_RETURN,
  G_UNICODE_BREAK_LINE_FEED,
  G_UNICODE_BREAK_COMBINING_MARK,
  G_UNICODE_BREAK_SURROGATE,
  G_UNICODE_BREAK_ZERO_WIDTH_SPACE,
  G_UNICODE_BREAK_INSEPARABLE,
  G_UNICODE_BREAK_NON_BREAKING_GLUE,
  G_UNICODE_BREAK_CONTINGENT,
  G_UNICODE_BREAK_SPACE,
  G_UNICODE_BREAK_AFTER,
  G_UNICODE_BREAK_BEFORE,
  G_UNICODE_BREAK_BEFORE_AND_AFTER,
  G_UNICODE_BREAK_HYPHEN,
  G_UNICODE_BREAK_NON_STARTER,
  G_UNICODE_BREAK_OPEN_PUNCTUATION,
  G_UNICODE_BREAK_CLOSE_PUNCTUATION,
  G_UNICODE_BREAK_QUOTATION,
  G_UNICODE_BREAK_EXCLAMATION,
  G_UNICODE_BREAK_IDEOGRAPHIC,
  G_UNICODE_BREAK_NUMERIC,
  G_UNICODE_BREAK_INFIX_SEPARATOR,
  G_UNICODE_BREAK_SYMBOL,
  G_UNICODE_BREAK_ALPHABETIC,
  G_UNICODE_BREAK_PREFIX,
  G_UNICODE_BREAK_POSTFIX,
  G_UNICODE_BREAK_COMPLEX_CONTEXT,
  G_UNICODE_BREAK_AMBIGUOUS,
  G_UNICODE_BREAK_UNKNOWN,
  G_UNICODE_BREAK_NEXT_LINE,
  G_UNICODE_BREAK_WORD_JOINER,
  G_UNICODE_BREAK_HANGUL_L_JAMO,
  G_UNICODE_BREAK_HANGUL_V_JAMO,
  G_UNICODE_BREAK_HANGUL_T_JAMO,
  G_UNICODE_BREAK_HANGUL_LV_SYLLABLE,
  G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE,
  G_UNICODE_BREAK_CLOSE_PARANTHESIS,
  G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER,
  G_UNICODE_BREAK_HEBREW_LETTER,
  G_UNICODE_BREAK_REGIONAL_INDICATOR
} GUnicodeBreakType;
</pre>
<p>
These are the possible line break classifications.
</p>
<p>
Since new unicode versions may add new types here, applications should be ready 
to handle unknown values. They may be regarded as <a class="link" href="glib-Unicode-Manipulation.html#G-UNICODE-BREAK-UNKNOWN:CAPS"><code class="literal">G_UNICODE_BREAK_UNKNOWN</code></a>.
</p>
<p>
See <a class="ulink" href="http://www.unicode.org/unicode/reports/tr14/" target="_top">http://www.unicode.org/unicode/reports/tr14/</a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="G-UNICODE-BREAK-MANDATORY:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_MANDATORY</code></span></p></td>
<td>Mandatory Break (BK)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-CARRIAGE-RETURN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_CARRIAGE_RETURN</code></span></p></td>
<td>Carriage Return (CR)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-LINE-FEED:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_LINE_FEED</code></span></p></td>
<td>Line Feed (LF)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-COMBINING-MARK:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_COMBINING_MARK</code></span></p></td>
<td>Attached Characters and Combining Marks (CM)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-SURROGATE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_SURROGATE</code></span></p></td>
<td>Surrogates (SG)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-ZERO-WIDTH-SPACE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_ZERO_WIDTH_SPACE</code></span></p></td>
<td>Zero Width Space (ZW)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-INSEPARABLE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_INSEPARABLE</code></span></p></td>
<td>Inseparable (IN)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-NON-BREAKING-GLUE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_NON_BREAKING_GLUE</code></span></p></td>
<td>Non-breaking ("Glue") (GL)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-CONTINGENT:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_CONTINGENT</code></span></p></td>
<td>Contingent Break Opportunity (CB)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-SPACE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_SPACE</code></span></p></td>
<td>Space (SP)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-AFTER:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_AFTER</code></span></p></td>
<td>Break Opportunity After (BA)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-BEFORE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_BEFORE</code></span></p></td>
<td>Break Opportunity Before (BB)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-BEFORE-AND-AFTER:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_BEFORE_AND_AFTER</code></span></p></td>
<td>Break Opportunity Before and After (B2)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-HYPHEN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_HYPHEN</code></span></p></td>
<td>Hyphen (HY)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-NON-STARTER:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_NON_STARTER</code></span></p></td>
<td>Nonstarter (NS)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-OPEN-PUNCTUATION:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_OPEN_PUNCTUATION</code></span></p></td>
<td>Opening Punctuation (OP)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-CLOSE-PUNCTUATION:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_CLOSE_PUNCTUATION</code></span></p></td>
<td>Closing Punctuation (CL)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-QUOTATION:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_QUOTATION</code></span></p></td>
<td>Ambiguous Quotation (QU)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-EXCLAMATION:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_EXCLAMATION</code></span></p></td>
<td>Exclamation/Interrogation (EX)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-IDEOGRAPHIC:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_IDEOGRAPHIC</code></span></p></td>
<td>Ideographic (ID)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-NUMERIC:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_NUMERIC</code></span></p></td>
<td>Numeric (NU)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-INFIX-SEPARATOR:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_INFIX_SEPARATOR</code></span></p></td>
<td>Infix Separator (Numeric) (IS)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-SYMBOL:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_SYMBOL</code></span></p></td>
<td>Symbols Allowing Break After (SY)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-ALPHABETIC:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_ALPHABETIC</code></span></p></td>
<td>Ordinary Alphabetic and Symbol Characters (AL)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-PREFIX:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_PREFIX</code></span></p></td>
<td>Prefix (Numeric) (PR)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-POSTFIX:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_POSTFIX</code></span></p></td>
<td>Postfix (Numeric) (PO)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-COMPLEX-CONTEXT:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_COMPLEX_CONTEXT</code></span></p></td>
<td>Complex Content Dependent (South East Asian) (SA)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-AMBIGUOUS:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_AMBIGUOUS</code></span></p></td>
<td>Ambiguous (Alphabetic or Ideographic) (AI)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-UNKNOWN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_UNKNOWN</code></span></p></td>
<td>Unknown (XX)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-NEXT-LINE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_NEXT_LINE</code></span></p></td>
<td>Next Line (NL)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-WORD-JOINER:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_WORD_JOINER</code></span></p></td>
<td>Word Joiner (WJ)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-HANGUL-L-JAMO:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_HANGUL_L_JAMO</code></span></p></td>
<td>Hangul L Jamo (JL)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-HANGUL-V-JAMO:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_HANGUL_V_JAMO</code></span></p></td>
<td>Hangul V Jamo (JV)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-HANGUL-T-JAMO:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_HANGUL_T_JAMO</code></span></p></td>
<td>Hangul T Jamo (JT)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-HANGUL-LV-SYLLABLE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_HANGUL_LV_SYLLABLE</code></span></p></td>
<td>Hangul LV Syllable (H2)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-HANGUL-LVT-SYLLABLE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE</code></span></p></td>
<td>Hangul LVT Syllable (H3)
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-CLOSE-PARANTHESIS:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_CLOSE_PARANTHESIS</code></span></p></td>
<td>Closing Parenthesis (CP). Since 2.28
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-CONDITIONAL-JAPANESE-STARTER:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER</code></span></p></td>
<td>Conditional Japanese Starter (CJ). Since: 2.32
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-HEBREW-LETTER:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_HEBREW_LETTER</code></span></p></td>
<td>Hebrew Letter (HL). Since: 2.32
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-BREAK-REGIONAL-INDICATOR:CAPS"></a><span class="term"><code class="literal">G_UNICODE_BREAK_REGIONAL_INDICATOR</code></span></p></td>
<td>Regional Indicator (RI). Since: 2.36
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-break-type"></a><h3>g_unichar_break_type ()</h3>
<pre class="programlisting"><a class="link" href="glib-Unicode-Manipulation.html#GUnicodeBreakType" title="enum GUnicodeBreakType"><span class="returnvalue">GUnicodeBreakType</span></a>   g_unichar_break_type                (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Determines the break type of <em class="parameter"><code>c</code></em>. <em class="parameter"><code>c</code></em> should be a Unicode character
(to derive a character from UTF-8 encoded text, use
<a class="link" href="glib-Unicode-Manipulation.html#g-utf8-get-char" title="g_utf8_get_char ()"><code class="function">g_utf8_get_char()</code></a>). The break type is used to find word and line
breaks ("text boundaries"), Pango implements the Unicode boundary
resolution algorithms and normally you would use a function such
as <a href="/usr/share/gtk-doc/html/pango/pango-Text-Processing.html#pango-break"><code class="function">pango_break()</code></a> instead of caring about break types yourself.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the break type of <em class="parameter"><code>c</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-combining-class"></a><h3>g_unichar_combining_class ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                g_unichar_combining_class           (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> uc</code></em>);</pre>
<p>
Determines the canonical combining class of a Unicode character.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uc</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the combining class of the character</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unicode-canonical-ordering"></a><h3>g_unicode_canonical_ordering ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                g_unicode_canonical_ordering        (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> *string</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> len</code></em>);</pre>
<p>
Computes the canonical ordering of a string in-place.  
This rearranges decomposed characters in the string 
according to their combining classes.  See the Unicode 
manual for more information.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td>a UCS-4 encoded string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>the maximum length of <em class="parameter"><code>string</code></em> to use.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unicode-canonical-decomposition"></a><h3>g_unicode_canonical_decomposition ()</h3>
<pre class="programlisting"><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="returnvalue">gunichar</span></a> *          g_unicode_canonical_decomposition   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> ch</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> *result_len</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">g_unicode_canonical_decomposition</code> has been deprecated since version 2.30 and should not be used in newly-written code. Use the more flexible <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-fully-decompose" title="g_unichar_fully_decompose ()"><code class="function">g_unichar_fully_decompose()</code></a>
  instead.</p>
</div>
<p>
Computes the canonical decomposition of a Unicode character.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>ch</code></em> :</span></p></td>
<td>a Unicode character.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>result_len</code></em> :</span></p></td>
<td>location to store the length of the return value.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a newly allocated string of Unicode characters.
<em class="parameter"><code>result_len</code></em> is set to the resulting length of the string.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-get-mirror-char"></a><h3>g_unichar_get_mirror_char ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_unichar_get_mirror_char           (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> ch</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> *mirrored_ch</code></em>);</pre>
<p>
In Unicode, some characters are <em class="firstterm">mirrored</em>. This
means that their images are mirrored horizontally in text that is laid
out from right to left. For instance, "(" would become its mirror image,
")", in right-to-left text.
</p>
<p>
If <em class="parameter"><code>ch</code></em> has the Unicode mirrored property and there is another unicode
character that typically has a glyph that is the mirror image of <em class="parameter"><code>ch</code></em>'s
glyph and <em class="parameter"><code>mirrored_ch</code></em> is set, it puts that character in the address
pointed to by <em class="parameter"><code>mirrored_ch</code></em>.  Otherwise the original character is put.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>ch</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mirrored_ch</code></em> :</span></p></td>
<td>location to store the mirrored character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>ch</code></em> has a mirrored character, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="GUnicodeScript"></a><h3>enum GUnicodeScript</h3>
<pre class="programlisting">typedef enum {
                         /* ISO 15924 code */
  G_UNICODE_SCRIPT_INVALID_CODE = -1,
  G_UNICODE_SCRIPT_COMMON       = 0,   /* Zyyy */
  G_UNICODE_SCRIPT_INHERITED,          /* Zinh (Qaai) */
  G_UNICODE_SCRIPT_ARABIC,             /* Arab */
  G_UNICODE_SCRIPT_ARMENIAN,           /* Armn */
  G_UNICODE_SCRIPT_BENGALI,            /* Beng */
  G_UNICODE_SCRIPT_BOPOMOFO,           /* Bopo */
  G_UNICODE_SCRIPT_CHEROKEE,           /* Cher */
  G_UNICODE_SCRIPT_COPTIC,             /* Copt (Qaac) */
  G_UNICODE_SCRIPT_CYRILLIC,           /* Cyrl (Cyrs) */
  G_UNICODE_SCRIPT_DESERET,            /* Dsrt */
  G_UNICODE_SCRIPT_DEVANAGARI,         /* Deva */
  G_UNICODE_SCRIPT_ETHIOPIC,           /* Ethi */
  G_UNICODE_SCRIPT_GEORGIAN,           /* Geor (Geon, Geoa) */
  G_UNICODE_SCRIPT_GOTHIC,             /* Goth */
  G_UNICODE_SCRIPT_GREEK,              /* Grek */
  G_UNICODE_SCRIPT_GUJARATI,           /* Gujr */
  G_UNICODE_SCRIPT_GURMUKHI,           /* Guru */
  G_UNICODE_SCRIPT_HAN,                /* Hani */
  G_UNICODE_SCRIPT_HANGUL,             /* Hang */
  G_UNICODE_SCRIPT_HEBREW,             /* Hebr */
  G_UNICODE_SCRIPT_HIRAGANA,           /* Hira */
  G_UNICODE_SCRIPT_KANNADA,            /* Knda */
  G_UNICODE_SCRIPT_KATAKANA,           /* Kana */
  G_UNICODE_SCRIPT_KHMER,              /* Khmr */
  G_UNICODE_SCRIPT_LAO,                /* Laoo */
  G_UNICODE_SCRIPT_LATIN,              /* Latn (Latf, Latg) */
  G_UNICODE_SCRIPT_MALAYALAM,          /* Mlym */
  G_UNICODE_SCRIPT_MONGOLIAN,          /* Mong */
  G_UNICODE_SCRIPT_MYANMAR,            /* Mymr */
  G_UNICODE_SCRIPT_OGHAM,              /* Ogam */
  G_UNICODE_SCRIPT_OLD_ITALIC,         /* Ital */
  G_UNICODE_SCRIPT_ORIYA,              /* Orya */
  G_UNICODE_SCRIPT_RUNIC,              /* Runr */
  G_UNICODE_SCRIPT_SINHALA,            /* Sinh */
  G_UNICODE_SCRIPT_SYRIAC,             /* Syrc (Syrj, Syrn, Syre) */
  G_UNICODE_SCRIPT_TAMIL,              /* Taml */
  G_UNICODE_SCRIPT_TELUGU,             /* Telu */
  G_UNICODE_SCRIPT_THAANA,             /* Thaa */
  G_UNICODE_SCRIPT_THAI,               /* Thai */
  G_UNICODE_SCRIPT_TIBETAN,            /* Tibt */
  G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL, /* Cans */
  G_UNICODE_SCRIPT_YI,                 /* Yiii */
  G_UNICODE_SCRIPT_TAGALOG,            /* Tglg */
  G_UNICODE_SCRIPT_HANUNOO,            /* Hano */
  G_UNICODE_SCRIPT_BUHID,              /* Buhd */
  G_UNICODE_SCRIPT_TAGBANWA,           /* Tagb */

  /* Unicode-4.0 additions */
  G_UNICODE_SCRIPT_BRAILLE,            /* Brai */
  G_UNICODE_SCRIPT_CYPRIOT,            /* Cprt */
  G_UNICODE_SCRIPT_LIMBU,              /* Limb */
  G_UNICODE_SCRIPT_OSMANYA,            /* Osma */
  G_UNICODE_SCRIPT_SHAVIAN,            /* Shaw */
  G_UNICODE_SCRIPT_LINEAR_B,           /* Linb */
  G_UNICODE_SCRIPT_TAI_LE,             /* Tale */
  G_UNICODE_SCRIPT_UGARITIC,           /* Ugar */

  /* Unicode-4.1 additions */
  G_UNICODE_SCRIPT_NEW_TAI_LUE,        /* Talu */
  G_UNICODE_SCRIPT_BUGINESE,           /* Bugi */
  G_UNICODE_SCRIPT_GLAGOLITIC,         /* Glag */
  G_UNICODE_SCRIPT_TIFINAGH,           /* Tfng */
  G_UNICODE_SCRIPT_SYLOTI_NAGRI,       /* Sylo */
  G_UNICODE_SCRIPT_OLD_PERSIAN,        /* Xpeo */
  G_UNICODE_SCRIPT_KHAROSHTHI,         /* Khar */

  /* Unicode-5.0 additions */
  G_UNICODE_SCRIPT_UNKNOWN,            /* Zzzz */
  G_UNICODE_SCRIPT_BALINESE,           /* Bali */
  G_UNICODE_SCRIPT_CUNEIFORM,          /* Xsux */
  G_UNICODE_SCRIPT_PHOENICIAN,         /* Phnx */
  G_UNICODE_SCRIPT_PHAGS_PA,           /* Phag */
  G_UNICODE_SCRIPT_NKO,                /* Nkoo */

  /* Unicode-5.1 additions */
  G_UNICODE_SCRIPT_KAYAH_LI,           /* Kali */
  G_UNICODE_SCRIPT_LEPCHA,             /* Lepc */
  G_UNICODE_SCRIPT_REJANG,             /* Rjng */
  G_UNICODE_SCRIPT_SUNDANESE,          /* Sund */
  G_UNICODE_SCRIPT_SAURASHTRA,         /* Saur */
  G_UNICODE_SCRIPT_CHAM,               /* Cham */
  G_UNICODE_SCRIPT_OL_CHIKI,           /* Olck */
  G_UNICODE_SCRIPT_VAI,                /* Vaii */
  G_UNICODE_SCRIPT_CARIAN,             /* Cari */
  G_UNICODE_SCRIPT_LYCIAN,             /* Lyci */
  G_UNICODE_SCRIPT_LYDIAN,             /* Lydi */

  /* Unicode-5.2 additions */
  G_UNICODE_SCRIPT_AVESTAN,                /* Avst */
  G_UNICODE_SCRIPT_BAMUM,                  /* Bamu */
  G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS,   /* Egyp */
  G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC,       /* Armi */
  G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI,  /* Phli */
  G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN, /* Prti */
  G_UNICODE_SCRIPT_JAVANESE,               /* Java */
  G_UNICODE_SCRIPT_KAITHI,                 /* Kthi */
  G_UNICODE_SCRIPT_LISU,                   /* Lisu */
  G_UNICODE_SCRIPT_MEETEI_MAYEK,           /* Mtei */
  G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN,      /* Sarb */
  G_UNICODE_SCRIPT_OLD_TURKIC,             /* Orkh */
  G_UNICODE_SCRIPT_SAMARITAN,              /* Samr */
  G_UNICODE_SCRIPT_TAI_THAM,               /* Lana */
  G_UNICODE_SCRIPT_TAI_VIET,               /* Tavt */

  /* Unicode-6.0 additions */
  G_UNICODE_SCRIPT_BATAK,                  /* Batk */
  G_UNICODE_SCRIPT_BRAHMI,                 /* Brah */
  G_UNICODE_SCRIPT_MANDAIC,                /* Mand */

  /* Unicode-6.1 additions */
  G_UNICODE_SCRIPT_CHAKMA,                 /* Cakm */
  G_UNICODE_SCRIPT_MEROITIC_CURSIVE,       /* Merc */
  G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS,   /* Mero */
  G_UNICODE_SCRIPT_MIAO,                   /* Plrd */
  G_UNICODE_SCRIPT_SHARADA,                /* Shrd */
  G_UNICODE_SCRIPT_SORA_SOMPENG,           /* Sora */
  G_UNICODE_SCRIPT_TAKRI                   /* Takr */
} GUnicodeScript;
</pre>
<p>
The <a class="link" href="glib-Unicode-Manipulation.html#GUnicodeScript" title="enum GUnicodeScript"><span class="type">GUnicodeScript</span></a> enumeration identifies different writing
systems. The values correspond to the names as defined in the
Unicode standard. The enumeration has been added in GLib 2.14,
and is interchangeable with <a href="/usr/share/gtk-doc/html/pango/pango-Scripts-and-Languages.html#PangoScript"><span class="type">PangoScript</span></a>.
</p>
<p>
Note that new types may be added in the future. Applications
should be ready to handle unknown values.
See <a class="ulink" href="http://www.unicode.org/reports/tr24/" target="_top">Unicode Standard Annex
#24: Script names</a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-INVALID-CODE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_INVALID_CODE</code></span></p></td>
<td>                              a value never returned from <a class="link" href="glib-Unicode-Manipulation.html#g-unichar-get-script" title="g_unichar_get_script ()"><code class="function">g_unichar_get_script()</code></a>
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-COMMON:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_COMMON</code></span></p></td>
<td>a character used by multiple different scripts
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-INHERITED:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_INHERITED</code></span></p></td>
<td>a mark glyph that takes its script from the
i                             base glyph to which it is attached
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-ARABIC:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_ARABIC</code></span></p></td>
<td>Arabic
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-ARMENIAN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_ARMENIAN</code></span></p></td>
<td>Armenian
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-BENGALI:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_BENGALI</code></span></p></td>
<td>Bengali
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-BOPOMOFO:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_BOPOMOFO</code></span></p></td>
<td>Bopomofo
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-CHEROKEE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_CHEROKEE</code></span></p></td>
<td>Cherokee
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-COPTIC:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_COPTIC</code></span></p></td>
<td>Coptic
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-CYRILLIC:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_CYRILLIC</code></span></p></td>
<td>Cyrillic
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-DESERET:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_DESERET</code></span></p></td>
<td>Deseret
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-DEVANAGARI:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_DEVANAGARI</code></span></p></td>
<td>Devanagari
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-ETHIOPIC:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_ETHIOPIC</code></span></p></td>
<td>Ethiopic
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-GEORGIAN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_GEORGIAN</code></span></p></td>
<td>Georgian
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-GOTHIC:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_GOTHIC</code></span></p></td>
<td>Gothic
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-GREEK:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_GREEK</code></span></p></td>
<td>Greek
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-GUJARATI:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_GUJARATI</code></span></p></td>
<td>Gujarati
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-GURMUKHI:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_GURMUKHI</code></span></p></td>
<td>Gurmukhi
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-HAN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_HAN</code></span></p></td>
<td>Han
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-HANGUL:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_HANGUL</code></span></p></td>
<td>Hangul
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-HEBREW:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_HEBREW</code></span></p></td>
<td>Hebrew
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-HIRAGANA:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_HIRAGANA</code></span></p></td>
<td>Hiragana
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-KANNADA:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_KANNADA</code></span></p></td>
<td>Kannada
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-KATAKANA:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_KATAKANA</code></span></p></td>
<td>Katakana
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-KHMER:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_KHMER</code></span></p></td>
<td>Khmer
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-LAO:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_LAO</code></span></p></td>
<td>Lao
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-LATIN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_LATIN</code></span></p></td>
<td>Latin
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-MALAYALAM:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_MALAYALAM</code></span></p></td>
<td>Malayalam
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-MONGOLIAN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_MONGOLIAN</code></span></p></td>
<td>Mongolian
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-MYANMAR:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_MYANMAR</code></span></p></td>
<td>Myanmar
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-OGHAM:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_OGHAM</code></span></p></td>
<td>Ogham
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-OLD-ITALIC:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_OLD_ITALIC</code></span></p></td>
<td>Old Italic
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-ORIYA:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_ORIYA</code></span></p></td>
<td>Oriya
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-RUNIC:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_RUNIC</code></span></p></td>
<td>Runic
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-SINHALA:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_SINHALA</code></span></p></td>
<td>Sinhala
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-SYRIAC:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_SYRIAC</code></span></p></td>
<td>Syriac
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-TAMIL:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_TAMIL</code></span></p></td>
<td>Tamil
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-TELUGU:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_TELUGU</code></span></p></td>
<td>Telugu
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-THAANA:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_THAANA</code></span></p></td>
<td>Thaana
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-THAI:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_THAI</code></span></p></td>
<td>Thai
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-TIBETAN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_TIBETAN</code></span></p></td>
<td>Tibetan
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-CANADIAN-ABORIGINAL:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL</code></span></p></td>
<td>                              Canadian Aboriginal
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-YI:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_YI</code></span></p></td>
<td>Yi
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-TAGALOG:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_TAGALOG</code></span></p></td>
<td>Tagalog
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-HANUNOO:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_HANUNOO</code></span></p></td>
<td>Hanunoo
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-BUHID:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_BUHID</code></span></p></td>
<td>Buhid
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-TAGBANWA:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_TAGBANWA</code></span></p></td>
<td>Tagbanwa
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-BRAILLE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_BRAILLE</code></span></p></td>
<td>Braille
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-CYPRIOT:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_CYPRIOT</code></span></p></td>
<td>Cypriot
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-LIMBU:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_LIMBU</code></span></p></td>
<td>Limbu
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-OSMANYA:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_OSMANYA</code></span></p></td>
<td>Osmanya
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-SHAVIAN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_SHAVIAN</code></span></p></td>
<td>Shavian
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-LINEAR-B:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_LINEAR_B</code></span></p></td>
<td>Linear B
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-TAI-LE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_TAI_LE</code></span></p></td>
<td>Tai Le
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-UGARITIC:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_UGARITIC</code></span></p></td>
<td>Ugaritic
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-NEW-TAI-LUE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_NEW_TAI_LUE</code></span></p></td>
<td>                              New Tai Lue
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-BUGINESE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_BUGINESE</code></span></p></td>
<td>Buginese
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-GLAGOLITIC:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_GLAGOLITIC</code></span></p></td>
<td>Glagolitic
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-TIFINAGH:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_TIFINAGH</code></span></p></td>
<td>Tifinagh
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-SYLOTI-NAGRI:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_SYLOTI_NAGRI</code></span></p></td>
<td>                              Syloti Nagri
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-OLD-PERSIAN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_OLD_PERSIAN</code></span></p></td>
<td>                              Old Persian
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-KHAROSHTHI:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_KHAROSHTHI</code></span></p></td>
<td>Kharoshthi
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-UNKNOWN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_UNKNOWN</code></span></p></td>
<td>an unassigned code point
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-BALINESE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_BALINESE</code></span></p></td>
<td>Balinese
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-CUNEIFORM:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_CUNEIFORM</code></span></p></td>
<td>Cuneiform
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-PHOENICIAN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_PHOENICIAN</code></span></p></td>
<td>Phoenician
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-PHAGS-PA:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_PHAGS_PA</code></span></p></td>
<td>Phags-pa
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-NKO:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_NKO</code></span></p></td>
<td>N'Ko
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-KAYAH-LI:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_KAYAH_LI</code></span></p></td>
<td>Kayah Li. Since 2.16.3
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-LEPCHA:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_LEPCHA</code></span></p></td>
<td>Lepcha. Since 2.16.3
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-REJANG:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_REJANG</code></span></p></td>
<td>Rejang. Since 2.16.3
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-SUNDANESE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_SUNDANESE</code></span></p></td>
<td>Sundanese. Since 2.16.3
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-SAURASHTRA:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_SAURASHTRA</code></span></p></td>
<td>Saurashtra. Since 2.16.3
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-CHAM:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_CHAM</code></span></p></td>
<td>Cham. Since 2.16.3
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-OL-CHIKI:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_OL_CHIKI</code></span></p></td>
<td>Ol Chiki. Since 2.16.3
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-VAI:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_VAI</code></span></p></td>
<td>Vai. Since 2.16.3
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-CARIAN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_CARIAN</code></span></p></td>
<td>Carian. Since 2.16.3
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-LYCIAN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_LYCIAN</code></span></p></td>
<td>Lycian. Since 2.16.3
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-LYDIAN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_LYDIAN</code></span></p></td>
<td>Lydian. Since 2.16.3
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-AVESTAN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_AVESTAN</code></span></p></td>
<td>Avestan. Since 2.26
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-BAMUM:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_BAMUM</code></span></p></td>
<td>Bamum. Since 2.26
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-EGYPTIAN-HIEROGLYPHS:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS</code></span></p></td>
<td>                              Egyptian Hieroglpyhs. Since 2.26
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-IMPERIAL-ARAMAIC:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC</code></span></p></td>
<td>                              Imperial Aramaic. Since 2.26
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-INSCRIPTIONAL-PAHLAVI:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI</code></span></p></td>
<td>                              Inscriptional Pahlavi. Since 2.26
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-INSCRIPTIONAL-PARTHIAN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN</code></span></p></td>
<td>                              Inscriptional Parthian. Since 2.26
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-JAVANESE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_JAVANESE</code></span></p></td>
<td>Javanese. Since 2.26
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-KAITHI:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_KAITHI</code></span></p></td>
<td>Kaithi. Since 2.26
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-LISU:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_LISU</code></span></p></td>
<td>Lisu. Since 2.26
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-MEETEI-MAYEK:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_MEETEI_MAYEK</code></span></p></td>
<td>                              Meetei Mayek. Since 2.26
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-OLD-SOUTH-ARABIAN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN</code></span></p></td>
<td>                              Old South Arabian. Since 2.26
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-OLD-TURKIC:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_OLD_TURKIC</code></span></p></td>
<td>Old Turkic. Since 2.28
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-SAMARITAN:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_SAMARITAN</code></span></p></td>
<td>Samaritan. Since 2.26
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-TAI-THAM:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_TAI_THAM</code></span></p></td>
<td>Tai Tham. Since 2.26
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-TAI-VIET:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_TAI_VIET</code></span></p></td>
<td>Tai Viet. Since 2.26
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-BATAK:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_BATAK</code></span></p></td>
<td>Batak. Since 2.28
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-BRAHMI:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_BRAHMI</code></span></p></td>
<td>Brahmi. Since 2.28
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-MANDAIC:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_MANDAIC</code></span></p></td>
<td>Mandaic. Since 2.28
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-CHAKMA:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_CHAKMA</code></span></p></td>
<td>Chakma. Since: 2.32
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-MEROITIC-CURSIVE:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_MEROITIC_CURSIVE</code></span></p></td>
<td>Meroitic Cursive. Since: 2.32
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-MEROITIC-HIEROGLYPHS:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS</code></span></p></td>
<td>Meroitic Hieroglyphs. Since: 2.32
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-MIAO:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_MIAO</code></span></p></td>
<td>Miao. Since: 2.32
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-SHARADA:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_SHARADA</code></span></p></td>
<td>Sharada. Since: 2.32
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-SORA-SOMPENG:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_SORA_SOMPENG</code></span></p></td>
<td>Sora Sompeng. Since: 2.32
</td>
</tr>
<tr>
<td><p><a name="G-UNICODE-SCRIPT-TAKRI:CAPS"></a><span class="term"><code class="literal">G_UNICODE_SCRIPT_TAKRI</code></span></p></td>
<td>Takri. Since: 2.32
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-get-script"></a><h3>g_unichar_get_script ()</h3>
<pre class="programlisting"><a class="link" href="glib-Unicode-Manipulation.html#GUnicodeScript" title="enum GUnicodeScript"><span class="returnvalue">GUnicodeScript</span></a>      g_unichar_get_script                (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> ch</code></em>);</pre>
<p>
Looks up the <a class="link" href="glib-Unicode-Manipulation.html#GUnicodeScript" title="enum GUnicodeScript"><span class="type">GUnicodeScript</span></a> for a particular character (as defined 
by Unicode Standard Annex #24). No check is made for <em class="parameter"><code>ch</code></em> being a
valid Unicode character; if you pass in invalid character, the
result is undefined.
</p>
<p>
This function is equivalent to <a href="/usr/share/gtk-doc/html/pango/pango-Scripts-and-Languages.html#pango-script-for-unichar"><code class="function">pango_script_for_unichar()</code></a> and the
two are interchangeable.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>ch</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="glib-Unicode-Manipulation.html#GUnicodeScript" title="enum GUnicodeScript"><span class="type">GUnicodeScript</span></a> for the character.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unicode-script-from-iso15924"></a><h3>g_unicode_script_from_iso15924 ()</h3>
<pre class="programlisting"><a class="link" href="glib-Unicode-Manipulation.html#GUnicodeScript" title="enum GUnicodeScript"><span class="returnvalue">GUnicodeScript</span></a>      g_unicode_script_from_iso15924      (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#guint32" title="guint32"><span class="type">guint32</span></a> iso15924</code></em>);</pre>
<p>
Looks up the Unicode script for <em class="parameter"><code>iso15924</code></em>.  ISO 15924 assigns four-letter
codes to scripts.  For example, the code for Arabic is 'Arab'.
This function accepts four letter codes encoded as a <em class="parameter"><code>guint32</code></em> in a
big-endian fashion.  That is, the code expected for Arabic is
0x41726162 (0x41 is ASCII code for 'A', 0x72 is ASCII code for 'r', etc).
</p>
<p>
See <a class="ulink" href="http://unicode.org/iso15924/codelists.html" target="_top">Codes for the
representation of names of scripts</a> for details.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iso15924</code></em> :</span></p></td>
<td>a Unicode script</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the Unicode script for <em class="parameter"><code>iso15924</code></em>, or
of <a class="link" href="glib-Unicode-Manipulation.html#G-UNICODE-SCRIPT-INVALID-CODE:CAPS"><code class="literal">G_UNICODE_SCRIPT_INVALID_CODE</code></a> if <em class="parameter"><code>iso15924</code></em> is zero and
<a class="link" href="glib-Unicode-Manipulation.html#G-UNICODE-SCRIPT-UNKNOWN:CAPS"><code class="literal">G_UNICODE_SCRIPT_UNKNOWN</code></a> if <em class="parameter"><code>iso15924</code></em> is unknown.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.30</p>
</div>
<hr>
<div class="refsect2">
<a name="g-unicode-script-to-iso15924"></a><h3>g_unicode_script_to_iso15924 ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint32" title="guint32"><span class="returnvalue">guint32</span></a>             g_unicode_script_to_iso15924        (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#GUnicodeScript" title="enum GUnicodeScript"><span class="type">GUnicodeScript</span></a> script</code></em>);</pre>
<p>
Looks up the ISO 15924 code for <em class="parameter"><code>script</code></em>.  ISO 15924 assigns four-letter
codes to scripts.  For example, the code for Arabic is 'Arab'.  The
four letter codes are encoded as a <em class="parameter"><code>guint32</code></em> by this function in a
big-endian fashion.  That is, the code returned for Arabic is
0x41726162 (0x41 is ASCII code for 'A', 0x72 is ASCII code for 'r', etc).
</p>
<p>
See <a class="ulink" href="http://unicode.org/iso15924/codelists.html" target="_top">Codes for the
representation of names of scripts</a> for details.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>script</code></em> :</span></p></td>
<td>a Unicode script</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the ISO 15924 code for <em class="parameter"><code>script</code></em>, encoded as an integer,
of zero if <em class="parameter"><code>script</code></em> is <a class="link" href="glib-Unicode-Manipulation.html#G-UNICODE-SCRIPT-INVALID-CODE:CAPS"><code class="literal">G_UNICODE_SCRIPT_INVALID_CODE</code></a> or
ISO 15924 code 'Zzzz' (script code for UNKNOWN) if <em class="parameter"><code>script</code></em> is not understood.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.30</p>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-next-char"></a><h3>g_utf8_next_char()</h3>
<pre class="programlisting">#define             g_utf8_next_char(p)</pre>
<p>
Skips to the next character in a UTF-8 string. The string must be
valid; this macro is as fast as possible, and has no error-checking.
You would use this macro to iterate over a string character by
character. The macro returns the start of the next UTF-8 character.
Before using this macro, use <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-validate" title="g_utf8_validate ()"><code class="function">g_utf8_validate()</code></a> to validate strings
that may contain invalid UTF-8.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>Pointer to the start of a valid UTF-8 character</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-get-char"></a><h3>g_utf8_get_char ()</h3>
<pre class="programlisting"><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="returnvalue">gunichar</span></a>            g_utf8_get_char                     (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *p</code></em>);</pre>
<p>
Converts a sequence of bytes encoded as UTF-8 to a Unicode character.
If <em class="parameter"><code>p</code></em> does not point to a valid UTF-8 encoded character, results are
undefined. If you are not sure that the bytes are complete
valid Unicode characters, you should use <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-get-char-validated" title="g_utf8_get_char_validated ()"><code class="function">g_utf8_get_char_validated()</code></a>
instead.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>a pointer to Unicode character encoded as UTF-8</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the resulting character</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-get-char-validated"></a><h3>g_utf8_get_char_validated ()</h3>
<pre class="programlisting"><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="returnvalue">gunichar</span></a>            g_utf8_get_char_validated           (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *p</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> max_len</code></em>);</pre>
<p>
Convert a sequence of bytes encoded as UTF-8 to a Unicode character.
This function checks for incomplete characters, for invalid characters
such as characters that are out of the range of Unicode, and for
overlong encodings of valid characters.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>a pointer to Unicode character encoded as UTF-8</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>max_len</code></em> :</span></p></td>
<td>the maximum number of bytes to read, or -1, for no maximum or
if <em class="parameter"><code>p</code></em> is nul-terminated</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the resulting character. If <em class="parameter"><code>p</code></em> points to a partial
sequence at the end of a string that could begin a valid
character (or if <em class="parameter"><code>max_len</code></em> is zero), returns (gunichar)-2;
otherwise, if <em class="parameter"><code>p</code></em> does not point to a valid UTF-8 encoded
Unicode character, returns (gunichar)-1.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-offset-to-pointer"></a><h3>g_utf8_offset_to_pointer ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             g_utf8_offset_to_pointer            (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> offset</code></em>);</pre>
<p>
Converts from an integer character offset to a pointer to a position
within the string.
</p>
<p>
Since 2.10, this function allows to pass a negative <em class="parameter"><code>offset</code></em> to
step backwards. It is usually worth stepping backwards from the end
instead of forwards if <em class="parameter"><code>offset</code></em> is in the last fourth of the string,
since moving forward is about 3 times faster than moving backward.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
This function doesn't abort when reaching the end of <em class="parameter"><code>str</code></em>. Therefore
you should be sure that <em class="parameter"><code>offset</code></em> is within string boundaries before
calling that function. Call <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-strlen" title="g_utf8_strlen ()"><code class="function">g_utf8_strlen()</code></a> when unsure.
</p>
<p>
This limitation exists as this function is called frequently during
text rendering and therefore has to be as fast as possible.
</p>
</div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>a UTF-8 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
<td>a character offset within <em class="parameter"><code>str</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the resulting pointer</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-pointer-to-offset"></a><h3>g_utf8_pointer_to_offset ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="returnvalue">glong</span></a>               g_utf8_pointer_to_offset            (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *pos</code></em>);</pre>
<p>
Converts from a pointer to position within a string to a integer
character offset.
</p>
<p>
Since 2.10, this function allows <em class="parameter"><code>pos</code></em> to be before <em class="parameter"><code>str</code></em>, and returns
a negative offset in this case.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>a UTF-8 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
<td>a pointer to a position within <em class="parameter"><code>str</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the resulting character offset</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-prev-char"></a><h3>g_utf8_prev_char ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             g_utf8_prev_char                    (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *p</code></em>);</pre>
<p>
Finds the previous UTF-8 character in the string before <em class="parameter"><code>p</code></em>.
</p>
<p>
<em class="parameter"><code>p</code></em> does not have to be at the beginning of a UTF-8 character. No check
is made to see if the character found is actually valid other than
it starts with an appropriate byte. If <em class="parameter"><code>p</code></em> might be the first
character of the string, you must use <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-find-prev-char" title="g_utf8_find_prev_char ()"><code class="function">g_utf8_find_prev_char()</code></a> instead.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>a pointer to a position within a UTF-8 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to the found character.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-find-next-char"></a><h3>g_utf8_find_next_char ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             g_utf8_find_next_char               (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *p</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *end</code></em>);</pre>
<p>
Finds the start of the next UTF-8 character in the string after <em class="parameter"><code>p</code></em>.
</p>
<p>
<em class="parameter"><code>p</code></em> does not have to be at the beginning of a UTF-8 character. No check
is made to see if the character found is actually valid other than
it starts with an appropriate byte.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>a pointer to a position within a UTF-8 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td>
<td>a pointer to the byte following the end of the string,
or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to indicate that the string is nul-terminated.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to the found character or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-find-prev-char"></a><h3>g_utf8_find_prev_char ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             g_utf8_find_prev_char               (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *p</code></em>);</pre>
<p>
Given a position <em class="parameter"><code>p</code></em> with a UTF-8 encoded string <em class="parameter"><code>str</code></em>, find the start
of the previous UTF-8 character starting before <em class="parameter"><code>p</code></em>. Returns <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if no
UTF-8 characters are present in <em class="parameter"><code>str</code></em> before <em class="parameter"><code>p</code></em>.
</p>
<p>
<em class="parameter"><code>p</code></em> does not have to be at the beginning of a UTF-8 character. No check
is made to see if the character found is actually valid other than
it starts with an appropriate byte.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>pointer to the beginning of a UTF-8 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>pointer to some position within <em class="parameter"><code>str</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to the found character or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-strlen"></a><h3>g_utf8_strlen ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="returnvalue">glong</span></a>               g_utf8_strlen                       (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *p</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> max</code></em>);</pre>
<p>
Computes the length of the string in characters, not including
the terminating nul character. If the <em class="parameter"><code>max</code></em>'th byte falls in the
middle of a character, the last (partial) character is not counted.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>pointer to the start of a UTF-8 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>max</code></em> :</span></p></td>
<td>the maximum number of bytes to examine. If <em class="parameter"><code>max</code></em>
is less than 0, then the string is assumed to be
nul-terminated. If <em class="parameter"><code>max</code></em> is 0, <em class="parameter"><code>p</code></em> will not be examined and
may be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. If <em class="parameter"><code>max</code></em> is greater than 0, up to <em class="parameter"><code>max</code></em>
bytes are examined</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the length of the string in characters</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-strncpy"></a><h3>g_utf8_strncpy ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             g_utf8_strncpy                      (<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *dest</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *src</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> n</code></em>);</pre>
<p>
Like the standard C <code class="function">strncpy()</code> function, but 
copies a given number of characters instead of a given number of 
bytes. The <em class="parameter"><code>src</code></em> string must be valid UTF-8 encoded text. 
(Use <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-validate" title="g_utf8_validate ()"><code class="function">g_utf8_validate()</code></a> on all text before trying to use UTF-8 
utility functions with it.)
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
<td>buffer to fill with characters from <em class="parameter"><code>src</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td>
<td>UTF-8 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n</code></em> :</span></p></td>
<td>character count</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td><em class="parameter"><code>dest</code></em></td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-strchr"></a><h3>g_utf8_strchr ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             g_utf8_strchr                       (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *p</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Finds the leftmost occurrence of the given Unicode character
in a UTF-8 encoded string, while limiting the search to <em class="parameter"><code>len</code></em> bytes.
If <em class="parameter"><code>len</code></em> is -1, allow unbounded search.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>a nul-terminated UTF-8 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>the maximum length of <em class="parameter"><code>p</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if the string does not contain the character,
otherwise, a pointer to the start of the leftmost occurrence of
the character in the string.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-strrchr"></a><h3>g_utf8_strrchr ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             g_utf8_strrchr                      (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *p</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>);</pre>
<p>
Find the rightmost occurrence of the given Unicode character
in a UTF-8 encoded string, while limiting the search to <em class="parameter"><code>len</code></em> bytes.
If <em class="parameter"><code>len</code></em> is -1, allow unbounded search.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>a nul-terminated UTF-8 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>the maximum length of <em class="parameter"><code>p</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if the string does not contain the character,
otherwise, a pointer to the start of the rightmost occurrence of the
character in the string.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-strreverse"></a><h3>g_utf8_strreverse ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             g_utf8_strreverse                   (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> len</code></em>);</pre>
<p>
Reverses a UTF-8 string. <em class="parameter"><code>str</code></em> must be valid UTF-8 encoded text. 
(Use <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-validate" title="g_utf8_validate ()"><code class="function">g_utf8_validate()</code></a> on all text before trying to use UTF-8 
utility functions with it.)
</p>
<p>
This function is intended for programmatic uses of reversed strings.
It pays no attention to decomposed characters, combining marks, byte 
order marks, directional indicators (LRM, LRO, etc) and similar 
characters which might need special handling when reversing a string 
for display purposes.
</p>
<p>
Note that unlike <a class="link" href="glib-String-Utility-Functions.html#g-strreverse" title="g_strreverse ()"><code class="function">g_strreverse()</code></a>, this function returns
newly-allocated memory, which should be freed with <a class="link" href="glib-Memory-Allocation.html#g-free" title="g_free ()"><code class="function">g_free()</code></a> when
no longer needed.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>a UTF-8 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>the maximum length of <em class="parameter"><code>str</code></em> to use, in bytes. If <em class="parameter"><code>len</code></em> &lt; 0,
then the string is nul-terminated.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a newly-allocated string which is the reverse of <em class="parameter"><code>str</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-substring"></a><h3>g_utf8_substring ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             g_utf8_substring                    (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> start_pos</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> end_pos</code></em>);</pre>
<p>
Copies a substring out of a UTF-8 encoded string.
The substring will contain <em class="parameter"><code>end_pos</code></em> - <em class="parameter"><code>start_pos</code></em>
characters.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>a UTF-8 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_pos</code></em> :</span></p></td>
<td>a character offset within <em class="parameter"><code>str</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_pos</code></em> :</span></p></td>
<td>another character offset within <em class="parameter"><code>str</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a newly allocated copy of the requested
substring. Free with <a class="link" href="glib-Memory-Allocation.html#g-free" title="g_free ()"><code class="function">g_free()</code></a> when no longer needed.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.30</p>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-validate"></a><h3>g_utf8_validate ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_utf8_validate                     (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> max_len</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **end</code></em>);</pre>
<p>
Validates UTF-8 encoded text. <em class="parameter"><code>str</code></em> is the text to validate;
if <em class="parameter"><code>str</code></em> is nul-terminated, then <em class="parameter"><code>max_len</code></em> can be -1, otherwise
<em class="parameter"><code>max_len</code></em> should be the number of bytes to validate.
If <em class="parameter"><code>end</code></em> is non-<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, then the end of the valid range
will be stored there (i.e. the start of the first invalid 
character if some bytes were invalid, or the end of the text 
being validated otherwise).
</p>
<p>
Note that <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-validate" title="g_utf8_validate ()"><code class="function">g_utf8_validate()</code></a> returns <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> if <em class="parameter"><code>max_len</code></em> is 
positive and any of the <em class="parameter"><code>max_len</code></em> bytes are NUL.
</p>
<p>
Returns <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if all of <em class="parameter"><code>str</code></em> was valid. Many GLib and GTK+
routines <span class="emphasis"><em>require</em></span> valid UTF-8 as input;
so data read from a file or the network should be checked
with <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-validate" title="g_utf8_validate ()"><code class="function">g_utf8_validate()</code></a> before doing anything else with it.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>a pointer to character data. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=max_len][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>max_len</code></em> :</span></p></td>
<td>max bytes to validate, or -1 to go until NUL</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end</code></em> :</span></p></td>
<td>return location for end of valid data. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the text was valid UTF-8</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-strup"></a><h3>g_utf8_strup ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             g_utf8_strup                        (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> len</code></em>);</pre>
<p>
Converts all Unicode characters in the string that have a case
to uppercase. The exact manner that this is done depends
on the current locale, and may result in the number of
characters in the string increasing. (For instance, the
German ess-zet will be changed to SS.)
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>a UTF-8 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>length of <em class="parameter"><code>str</code></em>, in bytes, or -1 if <em class="parameter"><code>str</code></em> is nul-terminated.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a newly allocated string, with all characters
converted to uppercase.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-strdown"></a><h3>g_utf8_strdown ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             g_utf8_strdown                      (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> len</code></em>);</pre>
<p>
Converts all Unicode characters in the string that have a case
to lowercase. The exact manner that this is done depends
on the current locale, and may result in the number of
characters in the string changing.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>a UTF-8 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>length of <em class="parameter"><code>str</code></em>, in bytes, or -1 if <em class="parameter"><code>str</code></em> is nul-terminated.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a newly allocated string, with all characters
converted to lowercase.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-casefold"></a><h3>g_utf8_casefold ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             g_utf8_casefold                     (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> len</code></em>);</pre>
<p>
Converts a string into a form that is independent of case. The
result will not correspond to any particular case, but can be
compared for equality or ordered with the results of calling
<a class="link" href="glib-Unicode-Manipulation.html#g-utf8-casefold" title="g_utf8_casefold ()"><code class="function">g_utf8_casefold()</code></a> on other strings.
</p>
<p>
Note that calling <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-casefold" title="g_utf8_casefold ()"><code class="function">g_utf8_casefold()</code></a> followed by <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-collate" title="g_utf8_collate ()"><code class="function">g_utf8_collate()</code></a> is
only an approximation to the correct linguistic case insensitive
ordering, though it is a fairly good one. Getting this exactly
right would require a more sophisticated collation function that
takes case sensitivity into account. GLib does not currently
provide such a function.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>a UTF-8 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>length of <em class="parameter"><code>str</code></em>, in bytes, or -1 if <em class="parameter"><code>str</code></em> is nul-terminated.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a newly allocated string, that is a
case independent form of <em class="parameter"><code>str</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-normalize"></a><h3>g_utf8_normalize ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             g_utf8_normalize                    (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#GNormalizeMode" title="enum GNormalizeMode"><span class="type">GNormalizeMode</span></a> mode</code></em>);</pre>
<p>
Converts a string into canonical form, standardizing
such issues as whether a character with an accent
is represented as a base character and combining
accent or as a single precomposed character. The
string has to be valid UTF-8, otherwise <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is
returned. You should generally call <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-normalize" title="g_utf8_normalize ()"><code class="function">g_utf8_normalize()</code></a>
before comparing two Unicode strings.
</p>
<p>
The normalization mode <a class="link" href="glib-Unicode-Manipulation.html#G-NORMALIZE-DEFAULT:CAPS"><code class="literal">G_NORMALIZE_DEFAULT</code></a> only
standardizes differences that do not affect the
text content, such as the above-mentioned accent
representation. <a class="link" href="glib-Unicode-Manipulation.html#G-NORMALIZE-ALL:CAPS"><code class="literal">G_NORMALIZE_ALL</code></a> also standardizes
the "compatibility" characters in Unicode, such
as SUPERSCRIPT THREE to the standard forms
(in this case DIGIT THREE). Formatting information
may be lost but for most text operations such
characters should be considered the same.
</p>
<p>
<a class="link" href="glib-Unicode-Manipulation.html#G-NORMALIZE-DEFAULT-COMPOSE:CAPS"><code class="literal">G_NORMALIZE_DEFAULT_COMPOSE</code></a> and <a class="link" href="glib-Unicode-Manipulation.html#G-NORMALIZE-ALL-COMPOSE:CAPS"><code class="literal">G_NORMALIZE_ALL_COMPOSE</code></a>
are like <a class="link" href="glib-Unicode-Manipulation.html#G-NORMALIZE-DEFAULT:CAPS"><code class="literal">G_NORMALIZE_DEFAULT</code></a> and <a class="link" href="glib-Unicode-Manipulation.html#G-NORMALIZE-ALL:CAPS"><code class="literal">G_NORMALIZE_ALL</code></a>,
but returned a result with composed forms rather
than a maximally decomposed form. This is often
useful if you intend to convert the string to
a legacy encoding or pass it to a system with
less capable Unicode handling.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>a UTF-8 encoded string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>length of <em class="parameter"><code>str</code></em>, in bytes, or -1 if <em class="parameter"><code>str</code></em> is nul-terminated.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>the type of normalization to perform.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a newly allocated string, that is the
normalized form of <em class="parameter"><code>str</code></em>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if <em class="parameter"><code>str</code></em> is not
valid UTF-8.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GNormalizeMode"></a><h3>enum GNormalizeMode</h3>
<pre class="programlisting">typedef enum {
  G_NORMALIZE_DEFAULT,
  G_NORMALIZE_NFD = G_NORMALIZE_DEFAULT,
  G_NORMALIZE_DEFAULT_COMPOSE,
  G_NORMALIZE_NFC = G_NORMALIZE_DEFAULT_COMPOSE,
  G_NORMALIZE_ALL,
  G_NORMALIZE_NFKD = G_NORMALIZE_ALL,
  G_NORMALIZE_ALL_COMPOSE,
  G_NORMALIZE_NFKC = G_NORMALIZE_ALL_COMPOSE
} GNormalizeMode;
</pre>
<p>
Defines how a Unicode string is transformed in a canonical
form, standardizing such issues as whether a character with
an accent is represented as a base character and combining
accent or as a single precomposed character. Unicode strings
should generally be normalized before comparing them.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="G-NORMALIZE-DEFAULT:CAPS"></a><span class="term"><code class="literal">G_NORMALIZE_DEFAULT</code></span></p></td>
<td>standardize differences that do not affect the
    text content, such as the above-mentioned accent representation
</td>
</tr>
<tr>
<td><p><a name="G-NORMALIZE-NFD:CAPS"></a><span class="term"><code class="literal">G_NORMALIZE_NFD</code></span></p></td>
<td>another name for <a class="link" href="glib-Unicode-Manipulation.html#G-NORMALIZE-DEFAULT:CAPS"><code class="literal">G_NORMALIZE_DEFAULT</code></a>
</td>
</tr>
<tr>
<td><p><a name="G-NORMALIZE-DEFAULT-COMPOSE:CAPS"></a><span class="term"><code class="literal">G_NORMALIZE_DEFAULT_COMPOSE</code></span></p></td>
<td>like <a class="link" href="glib-Unicode-Manipulation.html#G-NORMALIZE-DEFAULT:CAPS"><code class="literal">G_NORMALIZE_DEFAULT</code></a>, but with
    composed forms rather than a maximally decomposed form
</td>
</tr>
<tr>
<td><p><a name="G-NORMALIZE-NFC:CAPS"></a><span class="term"><code class="literal">G_NORMALIZE_NFC</code></span></p></td>
<td>another name for <a class="link" href="glib-Unicode-Manipulation.html#G-NORMALIZE-DEFAULT-COMPOSE:CAPS"><code class="literal">G_NORMALIZE_DEFAULT_COMPOSE</code></a>
</td>
</tr>
<tr>
<td><p><a name="G-NORMALIZE-ALL:CAPS"></a><span class="term"><code class="literal">G_NORMALIZE_ALL</code></span></p></td>
<td>beyond <a class="link" href="glib-Unicode-Manipulation.html#G-NORMALIZE-DEFAULT:CAPS"><code class="literal">G_NORMALIZE_DEFAULT</code></a> also standardize the
    "compatibility" characters in Unicode, such as SUPERSCRIPT THREE
    to the standard forms (in this case DIGIT THREE). Formatting
    information may be lost but for most text operations such
    characters should be considered the same
</td>
</tr>
<tr>
<td><p><a name="G-NORMALIZE-NFKD:CAPS"></a><span class="term"><code class="literal">G_NORMALIZE_NFKD</code></span></p></td>
<td>another name for <a class="link" href="glib-Unicode-Manipulation.html#G-NORMALIZE-ALL:CAPS"><code class="literal">G_NORMALIZE_ALL</code></a>
</td>
</tr>
<tr>
<td><p><a name="G-NORMALIZE-ALL-COMPOSE:CAPS"></a><span class="term"><code class="literal">G_NORMALIZE_ALL_COMPOSE</code></span></p></td>
<td>like <a class="link" href="glib-Unicode-Manipulation.html#G-NORMALIZE-ALL:CAPS"><code class="literal">G_NORMALIZE_ALL</code></a>, but with composed
    forms rather than a maximally decomposed form
</td>
</tr>
<tr>
<td><p><a name="G-NORMALIZE-NFKC:CAPS"></a><span class="term"><code class="literal">G_NORMALIZE_NFKC</code></span></p></td>
<td>another name for <a class="link" href="glib-Unicode-Manipulation.html#G-NORMALIZE-ALL-COMPOSE:CAPS"><code class="literal">G_NORMALIZE_ALL_COMPOSE</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-collate"></a><h3>g_utf8_collate ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                g_utf8_collate                      (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str1</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str2</code></em>);</pre>
<p>
Compares two strings for ordering using the linguistically
correct rules for the <a class="link" href="glib-running.html#setlocale" title="Locale">current locale</a>. 
When sorting a large number of strings, it will be significantly 
faster to obtain collation keys with <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-collate-key" title="g_utf8_collate_key ()"><code class="function">g_utf8_collate_key()</code></a> and 
compare the keys with <code class="function">strcmp()</code> when sorting instead of sorting 
the original strings.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str1</code></em> :</span></p></td>
<td>a UTF-8 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>str2</code></em> :</span></p></td>
<td>a UTF-8 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>&lt; 0 if <em class="parameter"><code>str1</code></em> compares before <em class="parameter"><code>str2</code></em>,
0 if they compare equal, &gt; 0 if <em class="parameter"><code>str1</code></em> compares after <em class="parameter"><code>str2</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-collate-key"></a><h3>g_utf8_collate_key ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             g_utf8_collate_key                  (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> len</code></em>);</pre>
<p>
Converts a string into a collation key that can be compared
with other collation keys produced by the same function using 
<code class="function">strcmp()</code>. 
</p>
<p>
The results of comparing the collation keys of two strings 
with <code class="function">strcmp()</code> will always be the same as comparing the two 
original keys with <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-collate" title="g_utf8_collate ()"><code class="function">g_utf8_collate()</code></a>.
</p>
<p>
Note that this function depends on the 
<a class="link" href="glib-running.html#setlocale" title="Locale">current locale</a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>a UTF-8 encoded string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>length of <em class="parameter"><code>str</code></em>, in bytes, or -1 if <em class="parameter"><code>str</code></em> is nul-terminated.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a newly allocated string. This string should
be freed with <a class="link" href="glib-Memory-Allocation.html#g-free" title="g_free ()"><code class="function">g_free()</code></a> when you are done with it.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-collate-key-for-filename"></a><h3>g_utf8_collate_key_for_filename ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             g_utf8_collate_key_for_filename     (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gssize" title="gssize"><span class="type">gssize</span></a> len</code></em>);</pre>
<p>
Converts a string into a collation key that can be compared
with other collation keys produced by the same function using <code class="function">strcmp()</code>. 
</p>
<p>
In order to sort filenames correctly, this function treats the dot '.' 
as a special case. Most dictionary orderings seem to consider it
insignificant, thus producing the ordering "event.c" "eventgenerator.c"
"event.h" instead of "event.c" "event.h" "eventgenerator.c". Also, we
would like to treat numbers intelligently so that "file1" "file10" "file5"
is sorted as "file1" "file5" "file10".
</p>
<p>
Note that this function depends on the 
<a class="link" href="glib-running.html#setlocale" title="Locale">current locale</a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>a UTF-8 encoded string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>length of <em class="parameter"><code>str</code></em>, in bytes, or -1 if <em class="parameter"><code>str</code></em> is nul-terminated.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a newly allocated string. This string should
be freed with <a class="link" href="glib-Memory-Allocation.html#g-free" title="g_free ()"><code class="function">g_free()</code></a> when you are done with it.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.8</p>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-to-utf16"></a><h3>g_utf8_to_utf16 ()</h3>
<pre class="programlisting"><a class="link" href="glib-Unicode-Manipulation.html#gunichar2" title="gunichar2"><span class="returnvalue">gunichar2</span></a> *         g_utf8_to_utf16                     (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_read</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_written</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Convert a string from UTF-8 to UTF-16. A 0 character will be
added to the result after the converted text.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>a UTF-8 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>the maximum length (number of bytes) of <em class="parameter"><code>str</code></em> to use.
If <em class="parameter"><code>len</code></em> &lt; 0, then the string is nul-terminated.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>items_read</code></em> :</span></p></td>
<td>location to store number of bytes read, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.
If <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, then <a class="link" href="glib-Character-Set-Conversion.html#G-CONVERT-ERROR-PARTIAL-INPUT:CAPS"><code class="literal">G_CONVERT_ERROR_PARTIAL_INPUT</code></a> will be
returned in case <em class="parameter"><code>str</code></em> contains a trailing partial
character. If an error occurs then the index of the
invalid input is stored here. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>items_written</code></em> :</span></p></td>
<td>location to store number of <span class="type">gunichar2</span> written,
or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.
The value stored here does not include the trailing 0. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>location to store the error occurring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore
errors. Any of the errors in <a class="link" href="glib-Character-Set-Conversion.html#GConvertError" title="enum GConvertError"><span class="type">GConvertError</span></a> other than
<a class="link" href="glib-Character-Set-Conversion.html#G-CONVERT-ERROR-NO-CONVERSION:CAPS"><code class="literal">G_CONVERT_ERROR_NO_CONVERSION</code></a> may occur.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to a newly allocated UTF-16 string.
This value must be freed with <a class="link" href="glib-Memory-Allocation.html#g-free" title="g_free ()"><code class="function">g_free()</code></a>. If an
error occurs, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> will be returned and
<em class="parameter"><code>error</code></em> set.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-to-ucs4"></a><h3>g_utf8_to_ucs4 ()</h3>
<pre class="programlisting"><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="returnvalue">gunichar</span></a> *          g_utf8_to_ucs4                      (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_read</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_written</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Convert a string from UTF-8 to a 32-bit fixed width
representation as UCS-4. A trailing 0 character will be added to the
string after the converted text.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>a UTF-8 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>the maximum length of <em class="parameter"><code>str</code></em> to use, in bytes. If <em class="parameter"><code>len</code></em> &lt; 0,
then the string is nul-terminated.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>items_read</code></em> :</span></p></td>
<td>location to store number of bytes read, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.
If <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, then <a class="link" href="glib-Character-Set-Conversion.html#G-CONVERT-ERROR-PARTIAL-INPUT:CAPS"><code class="literal">G_CONVERT_ERROR_PARTIAL_INPUT</code></a> will be
returned in case <em class="parameter"><code>str</code></em> contains a trailing partial
character. If an error occurs then the index of the
invalid input is stored here. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>items_written</code></em> :</span></p></td>
<td>location to store number of characters written or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.
The value here stored does not include the trailing 0
character. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>location to store the error occurring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore
errors. Any of the errors in <a class="link" href="glib-Character-Set-Conversion.html#GConvertError" title="enum GConvertError"><span class="type">GConvertError</span></a> other than
<a class="link" href="glib-Character-Set-Conversion.html#G-CONVERT-ERROR-NO-CONVERSION:CAPS"><code class="literal">G_CONVERT_ERROR_NO_CONVERSION</code></a> may occur.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to a newly allocated UCS-4 string.
This value must be freed with <a class="link" href="glib-Memory-Allocation.html#g-free" title="g_free ()"><code class="function">g_free()</code></a>. If an
error occurs, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> will be returned and
<em class="parameter"><code>error</code></em> set.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf8-to-ucs4-fast"></a><h3>g_utf8_to_ucs4_fast ()</h3>
<pre class="programlisting"><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="returnvalue">gunichar</span></a> *          g_utf8_to_ucs4_fast                 (<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_written</code></em>);</pre>
<p>
Convert a string from UTF-8 to a 32-bit fixed width
representation as UCS-4, assuming valid UTF-8 input.
This function is roughly twice as fast as <a class="link" href="glib-Unicode-Manipulation.html#g-utf8-to-ucs4" title="g_utf8_to_ucs4 ()"><code class="function">g_utf8_to_ucs4()</code></a>
but does no error checking on the input. A trailing 0 character
will be added to the string after the converted text.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>a UTF-8 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>the maximum length of <em class="parameter"><code>str</code></em> to use, in bytes. If <em class="parameter"><code>len</code></em> &lt; 0,
then the string is nul-terminated.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>items_written</code></em> :</span></p></td>
<td>location to store the number of characters in the
result, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to a newly allocated UCS-4 string.
This value must be freed with <a class="link" href="glib-Memory-Allocation.html#g-free" title="g_free ()"><code class="function">g_free()</code></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf16-to-ucs4"></a><h3>g_utf16_to_ucs4 ()</h3>
<pre class="programlisting"><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="returnvalue">gunichar</span></a> *          g_utf16_to_ucs4                     (<em class="parameter"><code>const <a class="link" href="glib-Unicode-Manipulation.html#gunichar2" title="gunichar2"><span class="type">gunichar2</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_read</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_written</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Convert a string from UTF-16 to UCS-4. The result will be
nul-terminated.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>a UTF-16 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>the maximum length (number of <span class="type">gunichar2</span>) of <em class="parameter"><code>str</code></em> to use.
If <em class="parameter"><code>len</code></em> &lt; 0, then the string is nul-terminated.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>items_read</code></em> :</span></p></td>
<td>location to store number of words read, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.
If <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, then <a class="link" href="glib-Character-Set-Conversion.html#G-CONVERT-ERROR-PARTIAL-INPUT:CAPS"><code class="literal">G_CONVERT_ERROR_PARTIAL_INPUT</code></a> will be
returned in case <em class="parameter"><code>str</code></em> contains a trailing partial
character. If an error occurs then the index of the
invalid input is stored here. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>items_written</code></em> :</span></p></td>
<td>location to store number of characters written, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.
The value stored here does not include the trailing
0 character. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>location to store the error occurring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore
errors. Any of the errors in <a class="link" href="glib-Character-Set-Conversion.html#GConvertError" title="enum GConvertError"><span class="type">GConvertError</span></a> other than
<a class="link" href="glib-Character-Set-Conversion.html#G-CONVERT-ERROR-NO-CONVERSION:CAPS"><code class="literal">G_CONVERT_ERROR_NO_CONVERSION</code></a> may occur.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to a newly allocated UCS-4 string.
This value must be freed with <a class="link" href="glib-Memory-Allocation.html#g-free" title="g_free ()"><code class="function">g_free()</code></a>. If an
error occurs, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> will be returned and
<em class="parameter"><code>error</code></em> set.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-utf16-to-utf8"></a><h3>g_utf16_to_utf8 ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             g_utf16_to_utf8                     (<em class="parameter"><code>const <a class="link" href="glib-Unicode-Manipulation.html#gunichar2" title="gunichar2"><span class="type">gunichar2</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_read</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_written</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Convert a string from UTF-16 to UTF-8. The result will be
terminated with a 0 byte.
</p>
<p>
Note that the input is expected to be already in native endianness,
an initial byte-order-mark character is not handled specially.
<a class="link" href="glib-Character-Set-Conversion.html#g-convert" title="g_convert ()"><code class="function">g_convert()</code></a> can be used to convert a byte buffer of UTF-16 data of
ambiguous endianess.
</p>
<p>
Further note that this function does not validate the result
string; it may e.g. include embedded NUL characters. The only
validation done by this function is to ensure that the input can
be correctly interpreted as UTF-16, i.e. it doesn't contain
things unpaired surrogates.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>a UTF-16 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>the maximum length (number of <span class="type">gunichar2</span>) of <em class="parameter"><code>str</code></em> to use.
If <em class="parameter"><code>len</code></em> &lt; 0, then the string is nul-terminated.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>items_read</code></em> :</span></p></td>
<td>location to store number of words read, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.
If <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, then <a class="link" href="glib-Character-Set-Conversion.html#G-CONVERT-ERROR-PARTIAL-INPUT:CAPS"><code class="literal">G_CONVERT_ERROR_PARTIAL_INPUT</code></a> will be
returned in case <em class="parameter"><code>str</code></em> contains a trailing partial
character. If an error occurs then the index of the
invalid input is stored here. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>items_written</code></em> :</span></p></td>
<td>location to store number of bytes written, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.
The value stored here does not include the trailing
0 byte. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>location to store the error occurring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore
errors. Any of the errors in <a class="link" href="glib-Character-Set-Conversion.html#GConvertError" title="enum GConvertError"><span class="type">GConvertError</span></a> other than
<a class="link" href="glib-Character-Set-Conversion.html#G-CONVERT-ERROR-NO-CONVERSION:CAPS"><code class="literal">G_CONVERT_ERROR_NO_CONVERSION</code></a> may occur.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to a newly allocated UTF-8 string.
This value must be freed with <a class="link" href="glib-Memory-Allocation.html#g-free" title="g_free ()"><code class="function">g_free()</code></a>. If an
error occurs, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> will be returned and
<em class="parameter"><code>error</code></em> set.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-ucs4-to-utf16"></a><h3>g_ucs4_to_utf16 ()</h3>
<pre class="programlisting"><a class="link" href="glib-Unicode-Manipulation.html#gunichar2" title="gunichar2"><span class="returnvalue">gunichar2</span></a> *         g_ucs4_to_utf16                     (<em class="parameter"><code>const <a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_read</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_written</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Convert a string from UCS-4 to UTF-16. A 0 character will be
added to the result after the converted text.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>a UCS-4 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>the maximum length (number of characters) of <em class="parameter"><code>str</code></em> to use.
If <em class="parameter"><code>len</code></em> &lt; 0, then the string is nul-terminated.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>items_read</code></em> :</span></p></td>
<td>location to store number of bytes read, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.
If an error occurs then the index of the invalid input
is stored here. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>items_written</code></em> :</span></p></td>
<td>location to store number of <span class="type">gunichar2</span>
written, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. The value stored here does not
include the trailing 0. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>location to store the error occurring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore
errors. Any of the errors in <a class="link" href="glib-Character-Set-Conversion.html#GConvertError" title="enum GConvertError"><span class="type">GConvertError</span></a> other than
<a class="link" href="glib-Character-Set-Conversion.html#G-CONVERT-ERROR-NO-CONVERSION:CAPS"><code class="literal">G_CONVERT_ERROR_NO_CONVERSION</code></a> may occur.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to a newly allocated UTF-16 string.
This value must be freed with <a class="link" href="glib-Memory-Allocation.html#g-free" title="g_free ()"><code class="function">g_free()</code></a>. If an
error occurs, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> will be returned and
<em class="parameter"><code>error</code></em> set.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-ucs4-to-utf8"></a><h3>g_ucs4_to_utf8 ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             g_ucs4_to_utf8                      (<em class="parameter"><code>const <a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> *str</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> len</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_read</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#glong" title="glong"><span class="type">glong</span></a> *items_written</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="struct GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Convert a string from a 32-bit fixed width representation as UCS-4.
to UTF-8. The result will be terminated with a 0 byte.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>a UCS-4 encoded string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>the maximum length (number of characters) of <em class="parameter"><code>str</code></em> to use.
If <em class="parameter"><code>len</code></em> &lt; 0, then the string is nul-terminated.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>items_read</code></em> :</span></p></td>
<td>location to store number of characters read, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>items_written</code></em> :</span></p></td>
<td>location to store number of bytes written or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.
The value here stored does not include the trailing 0
byte. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>location to store the error occurring, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to ignore
errors. Any of the errors in <a class="link" href="glib-Character-Set-Conversion.html#GConvertError" title="enum GConvertError"><span class="type">GConvertError</span></a> other than
<a class="link" href="glib-Character-Set-Conversion.html#G-CONVERT-ERROR-NO-CONVERSION:CAPS"><code class="literal">G_CONVERT_ERROR_NO_CONVERSION</code></a> may occur.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to a newly allocated UTF-8 string.
This value must be freed with <a class="link" href="glib-Memory-Allocation.html#g-free" title="g_free ()"><code class="function">g_free()</code></a>. If an
error occurs, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> will be returned and
<em class="parameter"><code>error</code></em> set. In that case, <em class="parameter"><code>items_read</code></em> will be
set to the position of the first invalid input
character.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-unichar-to-utf8"></a><h3>g_unichar_to_utf8 ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a>                g_unichar_to_utf8                   (<em class="parameter"><code><a class="link" href="glib-Unicode-Manipulation.html#gunichar" title="gunichar"><span class="type">gunichar</span></a> c</code></em>,
                                                         <em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *outbuf</code></em>);</pre>
<p>
Converts a single character to UTF-8.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a Unicode character code</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>outbuf</code></em> :</span></p></td>
<td>output buffer, must have at least 6 bytes of space.
If <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, the length will be computed and returned
and nothing will be written to <em class="parameter"><code>outbuf</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>number of bytes written</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="glib-Unicode-Manipulation.see-also"></a><h2>See Also</h2>
g_locale_to_utf8(), <a class="link" href="glib-Character-Set-Conversion.html#g-locale-from-utf8" title="g_locale_from_utf8 ()"><code class="function">g_locale_from_utf8()</code></a>
</div>
<div class="footnotes">
<br><hr style="width:100; text-align:left;margin-left: 0">
<div id="ftn.utf16_surrogate_pairs" class="footnote"><em class="firstterm"><a href="#utf16_surrogate_pairs" class="firstterm"><sup>[4] </sup></a>surrogate pairs</em></div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.19</div>
</body>
</html>