pr29.c 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340
  1. /* pr29.h --- Detect strings that are non-idempotent under NFKC in Unicode 3.2.
  2. Copyright (C) 2004-2024 Simon Josefsson
  3. This file is part of GNU Libidn.
  4. GNU Libidn is free software: you can redistribute it and/or
  5. modify it under the terms of either:
  6. * the GNU Lesser General Public License as published by the Free
  7. Software Foundation; either version 3 of the License, or (at
  8. your option) any later version.
  9. or
  10. * the GNU General Public License as published by the Free
  11. Software Foundation; either version 2 of the License, or (at
  12. your option) any later version.
  13. or both in parallel, as here.
  14. GNU Libidn is distributed in the hope that it will be useful,
  15. but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. General Public License for more details.
  18. You should have received copies of the GNU General Public License and
  19. the GNU Lesser General Public License along with this program. If
  20. not, see <https://www.gnu.org/licenses/>. */
  21. #include <config.h>
  22. #include "pr29.h"
  23. /* Get stringprep_utf8_to_ucs4. */
  24. #include <stringprep.h>
  25. /*
  26. * The tables used in this file was extracted by Simon Josefsson from
  27. * pr-29.html and DerivedCombiningClass-3.2.0.txt, as published by
  28. * Unicode Inc., for the GNU Libidn project.
  29. *
  30. */
  31. /* These are the characters with non-zero combination class, extracted
  32. from DerivedCombiningClass-3.2.0.txt. */
  33. static uint32_t nzcc[] = {
  34. /* 1 # Mn [5] COMBINING TILDE OVERLAY..
  35. * ..COMBINING LONG SOLIDUS OVERLAY */
  36. 0x0334,
  37. 0x0335,
  38. 0x0336,
  39. 0x0337,
  40. 0x0338,
  41. /* 1 # Mn [2] COMBINING LONG VERTICAL LINE OVERLAY..
  42. * ..COMBINING SHORT VERTICAL LINE OVERLAY */
  43. 0x20D2,
  44. 0x20D3,
  45. /* 1 # Mn [3] COMBINING RING OVERLAY..
  46. * ..COMBINING ANTICLOCKWISE RING OVERLAY */
  47. 0x20D8,
  48. 0x20D9,
  49. 0x20DA,
  50. /* 1 # Mn [2] COMBINING REVERSE SOLIDUS OVERLAY..
  51. * ..COMBINING DOUBLE VERTICAL STROKE OVERLAY */
  52. 0x20E5,
  53. 0x20E6,
  54. /* 1 # Mn COMBINING LEFTWARDS ARROW OVERLAY */
  55. 0x20EA,
  56. /* 1 # Mn [3] MUSICAL SYMBOL COMBINING TREMOLO-1..
  57. * ..MUSICAL SYMBOL COMBINING TREMOLO-3 */
  58. 0x1D167,
  59. 0x1D168,
  60. 0x1D169,
  61. /* 7 # Mn DEVANAGARI SIGN NUKTA */
  62. 0x093C,
  63. /* 7 # Mn BENGALI SIGN NUKTA */
  64. 0x09BC,
  65. /* 7 # Mn GURMUKHI SIGN NUKTA */
  66. 0x0A3C,
  67. /* 7 # Mn GUJARATI SIGN NUKTA */
  68. 0x0ABC,
  69. /* 7 # Mn ORIYA SIGN NUKTA */
  70. 0x0B3C,
  71. /* 7 # Mn MYANMAR SIGN DOT BELOW */
  72. 0x1037,
  73. /* 8 # Mn [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..
  74. * ..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK */
  75. 0x3099,
  76. 0x309A,
  77. /* 9 # Mn DEVANAGARI SIGN VIRAMA */
  78. 0x094D,
  79. /* 9 # Mn BENGALI SIGN VIRAMA */
  80. 0x09CD,
  81. /* 9 # Mn GURMUKHI SIGN VIRAMA */
  82. 0x0A4D,
  83. /* 9 # Mn GUJARATI SIGN VIRAMA */
  84. 0x0ACD,
  85. /* 9 # Mn ORIYA SIGN VIRAMA */
  86. 0x0B4D,
  87. /* 9 # Mn TAMIL SIGN VIRAMA */
  88. 0x0BCD,
  89. /* 9 # Mn TELUGU SIGN VIRAMA */
  90. 0x0C4D,
  91. /* 9 # Mn KANNADA SIGN VIRAMA */
  92. 0x0CCD,
  93. /* 9 # Mn MALAYALAM SIGN VIRAMA */
  94. 0x0D4D,
  95. /* 9 # Mn SINHALA SIGN AL-LAKUNA */
  96. 0x0DCA,
  97. /* 9 # Mn THAI CHARACTER PHINTHU */
  98. 0x0E3A,
  99. /* 9 # Mn TIBETAN MARK HALANTA */
  100. 0x0F84,
  101. /* 9 # Mn MYANMAR SIGN VIRAMA */
  102. 0x1039,
  103. /* 9 # Mn TAGALOG SIGN VIRAMA */
  104. 0x1714,
  105. /* 9 # Mn HANUNOO SIGN PAMUDPOD */
  106. 0x1734,
  107. /* 9 # Mn KHMER SIGN COENG */
  108. 0x17D2,
  109. /* 10 # Mn HEBREW POINT SHEVA */
  110. 0x05B0,
  111. /* 11 # Mn HEBREW POINT HATAF SEGOL */
  112. 0x05B1,
  113. /* 12 # Mn HEBREW POINT HATAF PATAH */
  114. 0x05B2,
  115. /* 13 # Mn HEBREW POINT HATAF QAMATS */
  116. 0x05B3,
  117. /* 14 # Mn HEBREW POINT HIRIQ */
  118. 0x05B4,
  119. /* 15 # Mn HEBREW POINT TSERE */
  120. 0x05B5,
  121. /* 16 # Mn HEBREW POINT SEGOL */
  122. 0x05B6,
  123. /* 17 # Mn HEBREW POINT PATAH */
  124. 0x05B7,
  125. /* 18 # Mn HEBREW POINT QAMATS */
  126. 0x05B8,
  127. /* 19 # Mn HEBREW POINT HOLAM */
  128. 0x05B9,
  129. /* 20 # Mn HEBREW POINT QUBUTS */
  130. 0x05BB,
  131. /* 21 # Mn HEBREW POINT DAGESH OR MAPIQ */
  132. 0x05BC,
  133. /* 22 # Mn HEBREW POINT METEG */
  134. 0x05BD,
  135. /* 23 # Mn HEBREW POINT RAFE */
  136. 0x05BF,
  137. /* 24 # Mn HEBREW POINT SHIN DOT */
  138. 0x05C1,
  139. /* 25 # Mn HEBREW POINT SIN DOT */
  140. 0x05C2,
  141. /* 26 # Mn HEBREW POINT JUDEO-SPANISH VARIKA */
  142. 0xFB1E,
  143. /* 27 # Mn ARABIC FATHATAN */
  144. 0x064B,
  145. /* 28 # Mn ARABIC DAMMATAN */
  146. 0x064C,
  147. /* 29 # Mn ARABIC KASRATAN */
  148. 0x064D,
  149. /* 30 # Mn ARABIC FATHA */
  150. 0x064E,
  151. /* 31 # Mn ARABIC DAMMA */
  152. 0x064F,
  153. /* 32 # Mn ARABIC KASRA */
  154. 0x0650,
  155. /* 33 # Mn ARABIC SHADDA */
  156. 0x0651,
  157. /* 34 # Mn ARABIC SUKUN */
  158. 0x0652,
  159. /* 35 # Mn ARABIC LETTER SUPERSCRIPT ALEF */
  160. 0x0670,
  161. /* 36 # Mn SYRIAC LETTER SUPERSCRIPT ALAPH */
  162. 0x0711,
  163. /* 84 # Mn TELUGU LENGTH MARK */
  164. 0x0C55,
  165. /* 91 # Mn TELUGU AI LENGTH MARK */
  166. 0x0C56,
  167. /* 103 # Mn [2] THAI CHARACTER SARA U..
  168. * ..THAI CHARACTER SARA UU */
  169. 0x0E38,
  170. 0x0E39,
  171. /* 107 # Mn [4] THAI CHARACTER MAI EK..
  172. * ..THAI CHARACTER MAI CHATTAWA */
  173. 0x0E48,
  174. 0x0E49,
  175. 0x0E4A,
  176. 0x04EB,
  177. /* 118 # Mn [2] LAO VOWEL SIGN U..
  178. * ..LAO VOWEL SIGN UU */
  179. 0x0EB8,
  180. 0x0EB9,
  181. /* 122 # Mn [4] LAO TONE MAI EK..
  182. * ..LAO TONE MAI CATAWA */
  183. 0x0EC8,
  184. 0x0EC9,
  185. 0x0ECA,
  186. 0x0ECB,
  187. /* 129 # Mn TIBETAN VOWEL SIGN AA */
  188. 0x0F71,
  189. /* 130 # Mn TIBETAN VOWEL SIGN I */
  190. 0x0F72,
  191. /* 130 # Mn [4] TIBETAN VOWEL SIGN E..
  192. * ..TIBETAN VOWEL SIGN OO */
  193. 0x0F7A,
  194. 0x0F7B,
  195. 0x0F7C,
  196. 0x0F7D,
  197. /* 130 # Mn TIBETAN VOWEL SIGN REVERSED I */
  198. 0x0F80,
  199. /* 132 # Mn TIBETAN VOWEL SIGN U */
  200. 0x0F74,
  201. /* 202 # Mn [2] COMBINING PALATALIZED HOOK BELOW..
  202. * ..COMBINING RETROFLEX HOOK BELOW */
  203. 0x0321,
  204. 0x0322,
  205. /* 202 # Mn [2] COMBINING CEDILLA..
  206. * ..COMBINING OGONEK */
  207. 0x0327,
  208. 0x0328,
  209. /* 216 # Mn COMBINING HORN */
  210. 0x031B,
  211. /* 216 # Mn TIBETAN MARK TSA -PHRU */
  212. 0x0F39,
  213. /* 216 # Mc [2] MUSICAL SYMBOL COMBINING STEM..
  214. * ..MUSICAL SYMBOL COMBINING SPRECHGESANG STEM */
  215. 0x1D165,
  216. 0x1D166,
  217. /* 216 # Mc [5] MUSICAL SYMBOL COMBINING FLAG-1..
  218. * ..MUSICAL SYMBOL COMBINING FLAG-5 */
  219. 0x1D16E,
  220. 0x1D16F,
  221. 0x1D170,
  222. 0x1D171,
  223. 0x1D172,
  224. /* 218 # Mn IDEOGRAPHIC LEVEL TONE MARK */
  225. 0x302A,
  226. /* 220 # Mn [4] COMBINING GRAVE ACCENT BELOW..
  227. * ..COMBINING RIGHT TACK BELOW */
  228. 0x0316,
  229. 0x0317,
  230. 0x0318,
  231. 0x0319,
  232. /* 220 # Mn [5] COMBINING LEFT HALF RING BELOW..
  233. * ..COMBINING MINUS SIGN BELOW */
  234. 0x031C,
  235. 0x031D,
  236. 0x031E,
  237. 0x031F,
  238. 0x0320,
  239. /* 220 # Mn [4] COMBINING DOT BELOW..
  240. * ..COMBINING COMMA BELOW */
  241. 0x0323,
  242. 0x0324,
  243. 0x0325,
  244. 0x0326,
  245. /* 220 # Mn [11] COMBINING VERTICAL LINE BELOW..
  246. * ..COMBINING DOUBLE LOW LINE */
  247. 0x0329,
  248. 0x032A,
  249. 0x032B,
  250. 0x032C,
  251. 0x032D,
  252. 0x032E,
  253. 0x032F,
  254. 0x0330,
  255. 0x0331,
  256. 0x0332,
  257. 0x0333,
  258. /* 220 # Mn [4] COMBINING RIGHT HALF RING BELOW..
  259. * ..COMBINING SEAGULL BELOW */
  260. 0x0339,
  261. 0x033A,
  262. 0x033B,
  263. 0x033C,
  264. /* 220 # Mn [3] COMBINING EQUALS SIGN BELOW..
  265. * ..COMBINING LEFT ANGLE BELOW */
  266. 0x0347,
  267. 0x0348,
  268. 0x0349,
  269. /* 220 # Mn [2] COMBINING LEFT RIGHT ARROW BELOW..
  270. * ..COMBINING UPWARDS ARROW BELOW */
  271. 0x034D,
  272. 0x034E,
  273. /* 220 # Mn HEBREW ACCENT ETNAHTA */
  274. 0x0591,
  275. /* 220 # Mn HEBREW ACCENT TIPEHA */
  276. 0x0596,
  277. /* 220 # Mn HEBREW ACCENT TEVIR */
  278. 0x059B,
  279. /* 220 # Mn [5] HEBREW ACCENT MUNAH..
  280. * ..HEBREW ACCENT DARGA */
  281. 0x05A3,
  282. 0x05A4,
  283. 0x05A5,
  284. 0x05A6,
  285. 0x05A7,
  286. /* 220 # Mn HEBREW ACCENT YERAH BEN YOMO */
  287. 0x05AA,
  288. /* 220 # Mn ARABIC HAMZA BELOW */
  289. 0x0655,
  290. /* 220 # Mn ARABIC SMALL LOW SEEN */
  291. 0x06E3,
  292. /* 220 # Mn ARABIC EMPTY CENTRE LOW STOP */
  293. 0x06EA,
  294. /* 220 # Mn ARABIC SMALL LOW MEEM */
  295. 0x06ED,
  296. /* 220 # Mn SYRIAC PTHAHA BELOW */
  297. 0x0731,
  298. /* 220 # Mn SYRIAC ZQAPHA BELOW */
  299. 0x0734,
  300. /* 220 # Mn [3] SYRIAC RBASA BELOW..
  301. * ..SYRIAC DOTTED ZLAMA ANGULAR */
  302. 0x0737,
  303. 0x0738,
  304. 0x0739,
  305. /* 220 # Mn [2] SYRIAC HBASA BELOW..
  306. * ..SYRIAC HBASA-ESASA DOTTED */
  307. 0x073B,
  308. 0x073C,
  309. /* 220 # Mn SYRIAC ESASA BELOW */
  310. 0x073E,
  311. /* 220 # Mn SYRIAC RUKKAKHA */
  312. 0x0742,
  313. /* 220 # Mn SYRIAC TWO VERTICAL DOTS BELOW */
  314. 0x0744,
  315. /* 220 # Mn SYRIAC THREE DOTS BELOW */
  316. 0x0746,
  317. /* 220 # Mn SYRIAC OBLIQUE LINE BELOW */
  318. 0x0748,
  319. /* 220 # Mn DEVANAGARI STRESS SIGN ANUDATTA */
  320. 0x0952,
  321. /* 220 # Mn [2] TIBETAN ASTROLOGICAL SIGN -KHYUD PA..
  322. * ..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS */
  323. 0x0F18,
  324. 0x0F19,
  325. /* 220 # Mn TIBETAN MARK NGAS BZUNG NYI ZLA */
  326. 0x0F35,
  327. /* 220 # Mn TIBETAN MARK NGAS BZUNG SGOR RTAGS */
  328. 0x0F37,
  329. /* 220 # Mn TIBETAN SYMBOL PADMA GDAN */
  330. 0x0FC6,
  331. /* 220 # Mn COMBINING TRIPLE UNDERDOT */
  332. 0x20E8,
  333. /* 220 # Mn [8] MUSICAL SYMBOL COMBINING ACCENT..
  334. * ..MUSICAL SYMBOL COMBINING LOURE */
  335. 0x1D17B,
  336. 0x1D17C,
  337. 0x1D17D,
  338. 0x1D17E,
  339. 0x1D17F,
  340. 0x1D180,
  341. 0x1D181,
  342. 0x1D182,
  343. /* 220 # Mn [2] MUSICAL SYMBOL COMBINING DOUBLE TONGUE..
  344. * ..MUSICAL SYMBOL COMBINING TRIPLE TONGUE */
  345. 0x1D18A,
  346. 0x1D18B,
  347. /* 222 # Mn HEBREW ACCENT YETIV */
  348. 0x059A,
  349. /* 222 # Mn HEBREW ACCENT DEHI */
  350. 0x05AD,
  351. /* 222 # Mn IDEOGRAPHIC ENTERING TONE MARK */
  352. 0x302D,
  353. /* 224 # Mn [2] HANGUL SINGLE DOT TONE MARK..
  354. * ..HANGUL DOUBLE DOT TONE MARK */
  355. 0x302E,
  356. 0x302F,
  357. /* 226 # Mc MUSICAL SYMBOL COMBINING AUGMENTATION DOT */
  358. 0x1D16D,
  359. /* 228 # Mn HEBREW ACCENT ZINOR */
  360. 0x05AE,
  361. /* 228 # Mn MONGOLIAN LETTER ALI GALI DAGALGA */
  362. 0x18A9,
  363. /* 228 # Mn IDEOGRAPHIC RISING TONE MARK */
  364. 0x302B,
  365. /* 230 # Mn [21] COMBINING GRAVE ACCENT..
  366. * ..COMBINING REVERSED COMMA ABOVE */
  367. 0x0300,
  368. 0x0301,
  369. 0x0302,
  370. 0x0303,
  371. 0x0304,
  372. 0x0305,
  373. 0x0306,
  374. 0x0307,
  375. 0x0308,
  376. 0x0309,
  377. 0x030A,
  378. 0x030B,
  379. 0x030C,
  380. 0x030D,
  381. 0x030E,
  382. 0x030F,
  383. 0x0310,
  384. 0x0311,
  385. 0x0312,
  386. 0x0313,
  387. 0x0314,
  388. /* 230 # Mn [8] COMBINING X ABOVE..
  389. * ..COMBINING GREEK DIALYTIKA TONOS */
  390. 0x033D,
  391. 0x033E,
  392. 0x033F,
  393. 0x0340,
  394. 0x0341,
  395. 0x0342,
  396. 0x0343,
  397. 0x0344,
  398. /* 230 # Mn COMBINING BRIDGE ABOVE */
  399. 0x0346,
  400. /* 230 # Mn [3] COMBINING NOT TILDE ABOVE..
  401. * ..COMBINING ALMOST EQUAL TO ABOVE */
  402. 0x034A,
  403. 0x034B,
  404. 0x034C,
  405. /* 230 # Mn [13] COMBINING LATIN SMALL LETTER A..
  406. * ..COMBINING LATIN SMALL LETTER X */
  407. 0x0363,
  408. 0x0364,
  409. 0x0365,
  410. 0x0366,
  411. 0x0367,
  412. 0x0368,
  413. 0x0369,
  414. 0x036A,
  415. 0x036B,
  416. 0x036C,
  417. 0x036D,
  418. 0x036E,
  419. 0x036F,
  420. /* 230 # Mn [4] COMBINING CYRILLIC TITLO..
  421. * ..COMBINING CYRILLIC PSILI PNEUMATA */
  422. 0x0483,
  423. 0x0484,
  424. 0x0485,
  425. 0x0486,
  426. /* 230 # Mn [4] HEBREW ACCENT SEGOL..
  427. * ..HEBREW ACCENT ZAQEF GADOL */
  428. 0x0592,
  429. 0x0593,
  430. 0x0594,
  431. 0x0595,
  432. /* 230 # Mn [3] HEBREW ACCENT REVIA..
  433. * ..HEBREW ACCENT PASHTA */
  434. 0x0597,
  435. 0x0598,
  436. 0x0599,
  437. /* 230 # Mn [6] HEBREW ACCENT GERESH..
  438. * ..HEBREW ACCENT PAZER */
  439. 0x059C,
  440. 0x059D,
  441. 0x059E,
  442. 0x059F,
  443. 0x05A0,
  444. 0x05A1,
  445. /* 230 # Mn [2] HEBREW ACCENT QADMA..
  446. * ..HEBREW ACCENT TELISHA QETANA */
  447. 0x05A8,
  448. 0x05A9,
  449. /* 230 # Mn [2] HEBREW ACCENT OLE..
  450. * ..HEBREW ACCENT ILUY */
  451. 0x05AB,
  452. 0x05AC,
  453. /* 230 # Mn HEBREW MARK MASORA CIRCLE */
  454. 0x05AF,
  455. /* 230 # Mn HEBREW MARK UPPER DOT */
  456. 0x05C4,
  457. /* 230 # Mn [2] ARABIC MADDAH ABOVE..
  458. * ..ARABIC HAMZA ABOVE */
  459. 0x0653,
  460. 0x0654,
  461. /* 230 # Mn [7] ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..
  462. * ..ARABIC SMALL HIGH SEEN */
  463. 0x06D6,
  464. 0x06D7,
  465. 0x06D8,
  466. 0x06D9,
  467. 0x06DA,
  468. 0x06DB,
  469. 0x06DC,
  470. /* 230 # Mn [4] ARABIC SMALL HIGH ROUNDED ZERO..
  471. * ..ARABIC SMALL HIGH MEEM ISOLATED FORM */
  472. 0x06DF,
  473. 0x06E0,
  474. 0x06E1,
  475. 0x06E2,
  476. /* 230 # Mn ARABIC SMALL HIGH MADDA */
  477. 0x06E4,
  478. /* 230 # Mn [2] ARABIC SMALL HIGH YEH..
  479. * ..ARABIC SMALL HIGH NOON */
  480. 0x06E7,
  481. 0x06E8,
  482. /* 230 # Mn [2] ARABIC EMPTY CENTRE HIGH STOP..
  483. * ..ARABIC ROUNDED HIGH STOP WITH FILLED CENTRE */
  484. 0x06EB,
  485. 0x06EC,
  486. /* 230 # Mn SYRIAC PTHAHA ABOVE */
  487. 0x0730,
  488. /* 230 # Mn [2] SYRIAC PTHAHA DOTTED..
  489. * ..SYRIAC ZQAPHA ABOVE */
  490. 0x0732,
  491. 0x0733,
  492. /* 230 # Mn [2] SYRIAC ZQAPHA DOTTED..
  493. * ..SYRIAC RBASA ABOVE */
  494. 0x0735,
  495. 0x0736,
  496. /* 230 # Mn SYRIAC HBASA ABOVE */
  497. 0x073A,
  498. /* 230 # Mn SYRIAC ESASA ABOVE */
  499. 0x073D,
  500. /* 230 # Mn [3] SYRIAC RWAHA..
  501. * ..SYRIAC QUSHSHAYA */
  502. 0x073F,
  503. 0x0740,
  504. 0x0741,
  505. /* 230 # Mn SYRIAC TWO VERTICAL DOTS ABOVE */
  506. 0x0743,
  507. /* 230 # Mn SYRIAC THREE DOTS ABOVE */
  508. 0x0745,
  509. /* 230 # Mn SYRIAC OBLIQUE LINE ABOVE */
  510. 0x0747,
  511. /* 230 # Mn [2] SYRIAC MUSIC..
  512. * ..SYRIAC BARREKH */
  513. 0x0749,
  514. 0x074A,
  515. /* 230 # Mn DEVANAGARI STRESS SIGN UDATTA */
  516. 0x0951,
  517. /* 230 # Mn [2] DEVANAGARI GRAVE ACCENT..
  518. * ..DEVANAGARI ACUTE ACCENT */
  519. 0x0953,
  520. 0x0954,
  521. /* 230 # Mn [2] TIBETAN SIGN NYI ZLA NAA DA..
  522. * ..TIBETAN SIGN SNA LDAN */
  523. 0x0F82,
  524. 0x0F83,
  525. /* 230 # Mn [2] TIBETAN SIGN LCI RTAGS..
  526. * ..TIBETAN SIGN YANG RTAGS */
  527. 0x0F86,
  528. 0x0F87,
  529. /* 230 # Mn [2] COMBINING LEFT HARPOON ABOVE..
  530. * ..COMBINING RIGHT HARPOON ABOVE */
  531. 0x20D0,
  532. 0x20D1,
  533. /* 230 # Mn [4] COMBINING ANTICLOCKWISE ARROW ABOVE..
  534. * ..COMBINING RIGHT ARROW ABOVE */
  535. 0x20D4,
  536. 0x20D5,
  537. 0x20D6,
  538. 0x20D7,
  539. /* 230 # Mn [2] COMBINING THREE DOTS ABOVE..
  540. * ..COMBINING FOUR DOTS ABOVE */
  541. 0x20DB,
  542. 0x20DC,
  543. /* 230 # Mn COMBINING LEFT RIGHT ARROW ABOVE */
  544. 0x20E1,
  545. /* 230 # Mn COMBINING ANNUITY SYMBOL */
  546. 0x20E7,
  547. /* 230 # Mn COMBINING WIDE BRIDGE ABOVE */
  548. 0x20E9,
  549. /* 230 # Mn [4] COMBINING LIGATURE LEFT HALF..
  550. * ..COMBINING DOUBLE TILDE RIGHT HALF */
  551. 0xFE20,
  552. 0xFE21,
  553. 0xFE22,
  554. 0xFE23,
  555. /* 230 # Mn [5] MUSICAL SYMBOL COMBINING DOIT..
  556. * ..MUSICAL SYMBOL COMBINING BEND */
  557. 0x1D185,
  558. 0x1D186,
  559. 0x1D187,
  560. 0x1D188,
  561. 0x1D189,
  562. /* 230 # Mn [4] MUSICAL SYMBOL COMBINING DOWN BOW..
  563. * ..MUSICAL SYMBOL COMBINING SNAP PIZZICATO */
  564. 0x1D1AA,
  565. 0x1D1AB,
  566. 0x1D1AC,
  567. 0x1D1AD,
  568. /* 232 # Mn COMBINING COMMA ABOVE RIGHT */
  569. 0x0315,
  570. /* 232 # Mn COMBINING LEFT ANGLE ABOVE */
  571. 0x031A,
  572. /* 232 # Mn IDEOGRAPHIC DEPARTING TONE MARK */
  573. 0x302C,
  574. /* 233 # Mn COMBINING DOUBLE RIGHTWARDS ARROW BELOW */
  575. 0x0362,
  576. /* 234 # Mn [2] COMBINING DOUBLE TILDE..
  577. * ..COMBINING DOUBLE INVERTED BREVE */
  578. 0x0360,
  579. 0x0361,
  580. /* 240 # Mn COMBINING GREEK YPOGEGRAMMENI */
  581. 0x0345,
  582. 0
  583. };
  584. /*
  585. * 09C7 BENGALI VOWEL SIGN E 09BE BENGALI VOWEL SIGN AA or
  586. * 09D7 BENGALI AU LENGTH MARK
  587. */
  588. static const uint32_t pr29_1_1[] = {
  589. 0x09C7, 0
  590. };
  591. static const uint32_t pr29_1_2[] = {
  592. 0x09BE, 0x09D7, 0
  593. };
  594. /*
  595. * 0B47 ORIYA VOWEL SIGN E 0B3E ORIYA VOWEL SIGN AA or
  596. * 0B56 ORIYA AI LENGTH MARK or
  597. * 0B57 ORIYA AU LENGTH MARK
  598. */
  599. static const uint32_t pr29_2_1[] = {
  600. 0x0B47, 0
  601. };
  602. static const uint32_t pr29_2_2[] = {
  603. 0x0B3E, 0x0B56, 0x0B57, 0
  604. };
  605. /*
  606. * 0BC6 TAMIL VOWEL SIGN E 0BBE TAMIL VOWEL SIGN AA or
  607. * 0BD7 TAMIL AU LENGTH MARK
  608. */
  609. static const uint32_t pr29_3_1[] = {
  610. 0x0BC6, 0
  611. };
  612. static const uint32_t pr29_3_2[] = {
  613. 0x0BBE, 0x0BD7, 0
  614. };
  615. /*
  616. * 0BC7 TAMIL VOWEL SIGN EE 0BBE TAMIL VOWEL SIGN AA
  617. */
  618. static const uint32_t pr29_4_1[] = {
  619. 0x0BC7, 0
  620. };
  621. static const uint32_t pr29_4_2[] = {
  622. 0x0BBE, 0
  623. };
  624. /*
  625. * 0B92 TAMIL LETTER O 0BD7 TAMIL AU LENGTH MARK
  626. */
  627. static const uint32_t pr29_5_1[] = {
  628. 0x0B92, 0
  629. };
  630. static const uint32_t pr29_5_2[] = {
  631. 0x0BD7, 0
  632. };
  633. /*
  634. * 0CC6 KANNADA VOWEL SIGN E 0CC2 KANNADA VOWEL SIGN UU or
  635. * 0CD5 KANNADA LENGTH MARK or
  636. * 0CD6 KANNADA AI LENGTH MARK
  637. */
  638. static const uint32_t pr29_6_1[] = {
  639. 0x0CC6, 0
  640. };
  641. static const uint32_t pr29_6_2[] = {
  642. 0x0CC2, 0xCD5, 0xCD6, 0
  643. };
  644. /*
  645. * 0CBF KANNADA VOWEL SIGN I or
  646. * 0CCA KANNADA VOWEL SIGN O 0CD5 KANNADA LENGTH MARK
  647. */
  648. static const uint32_t pr29_7_1[] = {
  649. 0x0CBF, 0xCCA, 0
  650. };
  651. static const uint32_t pr29_7_2[] = {
  652. 0x0CD5, 0
  653. };
  654. /*
  655. * 0D47 MALAYALAM VOWEL SIGN EE 0D3E MALAYALAM VOWEL SIGN AA
  656. */
  657. static const uint32_t pr29_8_1[] = {
  658. 0x0D47, 0
  659. };
  660. static const uint32_t pr29_8_2[] = {
  661. 0x0D3E, 0
  662. };
  663. /*
  664. * 0D46 MALAYALAM VOWEL SIGN E 0D3E MALAYALAM VOWEL SIGN AA or
  665. * 0D57 MALAYALAM AU LENGTH MARK
  666. */
  667. static const uint32_t pr29_9_1[] = {
  668. 0x0D46, 0
  669. };
  670. static const uint32_t pr29_9_2[] = {
  671. 0x0D3E, 0x0D57, 0
  672. };
  673. /*
  674. * 1025 MYANMAR LETTER U 102E MYANMAR VOWEL SIGN II
  675. */
  676. static const uint32_t pr29_10_1[] = {
  677. 0x1025, 0
  678. };
  679. static const uint32_t pr29_10_2[] = {
  680. 0x102E, 0
  681. };
  682. /*
  683. * 0DD9 SINHALA VOWEL SIGN KOMBUVA 0DCF SINHALA VOWEL SIGN AELA-PILLA or
  684. * 0DDF SINHALA VOWEL SIGN GAYANUKITTA
  685. */
  686. static const uint32_t pr29_11_1[] = {
  687. 0x0DD9, 0
  688. };
  689. static const uint32_t pr29_11_2[] = {
  690. 0x0DCF, 0x0DDF, 0
  691. };
  692. /*
  693. * 1100..1112 HANGUL CHOSEONG KIYEOK..HIEUH [19 instances]
  694. * 1161..1175 HANGUL JUNGSEONG A..I [21 instances]
  695. */
  696. static const uint32_t pr29_12_1[] = {
  697. 0x1100, 0x1101, 0x1102, 0x1103, 0x1104, 0x1105, 0x1106, 0x1107,
  698. 0x1108, 0x1109, 0x110A, 0x110B, 0x110C, 0x110D, 0x110E, 0x110F,
  699. 0x1110, 0x1111, 0x1112, 0
  700. };
  701. static const uint32_t pr29_12_2[] = {
  702. 0x1161, 0x1162, 0x1163, 0x1164, 0x1165, 0x1166, 0x1167, 0x1168,
  703. 0x1169, 0x116A, 0x116B, 0x116C, 0x116D, 0x116E, 0x116F, 0x1170,
  704. 0x1171, 0x1172, 0x1173, 0x1174, 0x1175, 0
  705. };
  706. /*
  707. * [:HangulSyllableType=LV:]
  708. * 11A8..11C2 HANGUL JONGSEONG KIYEOK..HIEUH [27 instances]
  709. */
  710. static const uint32_t pr29_13_1[] = {
  711. 0xAC00, /* LV # Lo HANGUL SYLLABLE GA */
  712. 0xAC1C, /* LV # Lo HANGUL SYLLABLE GAE */
  713. 0xAC38, /* LV # Lo HANGUL SYLLABLE GYA */
  714. 0xAC54, /* LV # Lo HANGUL SYLLABLE GYAE */
  715. 0xAC70, /* LV # Lo HANGUL SYLLABLE GEO */
  716. 0xAC8C, /* LV # Lo HANGUL SYLLABLE GE */
  717. 0xACA8, /* LV # Lo HANGUL SYLLABLE GYEO */
  718. 0xACC4, /* LV # Lo HANGUL SYLLABLE GYE */
  719. 0xACE0, /* LV # Lo HANGUL SYLLABLE GO */
  720. 0xACFC, /* LV # Lo HANGUL SYLLABLE GWA */
  721. 0xAD18, /* LV # Lo HANGUL SYLLABLE GWAE */
  722. 0xAD34, /* LV # Lo HANGUL SYLLABLE GOE */
  723. 0xAD50, /* LV # Lo HANGUL SYLLABLE GYO */
  724. 0xAD6C, /* LV # Lo HANGUL SYLLABLE GU */
  725. 0xAD88, /* LV # Lo HANGUL SYLLABLE GWEO */
  726. 0xADA4, /* LV # Lo HANGUL SYLLABLE GWE */
  727. 0xADC0, /* LV # Lo HANGUL SYLLABLE GWI */
  728. 0xADDC, /* LV # Lo HANGUL SYLLABLE GYU */
  729. 0xADF8, /* LV # Lo HANGUL SYLLABLE GEU */
  730. 0xAE14, /* LV # Lo HANGUL SYLLABLE GYI */
  731. 0xAE30, /* LV # Lo HANGUL SYLLABLE GI */
  732. 0xAE4C, /* LV # Lo HANGUL SYLLABLE GGA */
  733. 0xAE68, /* LV # Lo HANGUL SYLLABLE GGAE */
  734. 0xAE84, /* LV # Lo HANGUL SYLLABLE GGYA */
  735. 0xAEA0, /* LV # Lo HANGUL SYLLABLE GGYAE */
  736. 0xAEBC, /* LV # Lo HANGUL SYLLABLE GGEO */
  737. 0xAED8, /* LV # Lo HANGUL SYLLABLE GGE */
  738. 0xAEF4, /* LV # Lo HANGUL SYLLABLE GGYEO */
  739. 0xAF10, /* LV # Lo HANGUL SYLLABLE GGYE */
  740. 0xAF2C, /* LV # Lo HANGUL SYLLABLE GGO */
  741. 0xAF48, /* LV # Lo HANGUL SYLLABLE GGWA */
  742. 0xAF64, /* LV # Lo HANGUL SYLLABLE GGWAE */
  743. 0xAF80, /* LV # Lo HANGUL SYLLABLE GGOE */
  744. 0xAF9C, /* LV # Lo HANGUL SYLLABLE GGYO */
  745. 0xAFB8, /* LV # Lo HANGUL SYLLABLE GGU */
  746. 0xAFD4, /* LV # Lo HANGUL SYLLABLE GGWEO */
  747. 0xAFF0, /* LV # Lo HANGUL SYLLABLE GGWE */
  748. 0xB00C, /* LV # Lo HANGUL SYLLABLE GGWI */
  749. 0xB028, /* LV # Lo HANGUL SYLLABLE GGYU */
  750. 0xB044, /* LV # Lo HANGUL SYLLABLE GGEU */
  751. 0xB060, /* LV # Lo HANGUL SYLLABLE GGYI */
  752. 0xB07C, /* LV # Lo HANGUL SYLLABLE GGI */
  753. 0xB098, /* LV # Lo HANGUL SYLLABLE NA */
  754. 0xB0B4, /* LV # Lo HANGUL SYLLABLE NAE */
  755. 0xB0D0, /* LV # Lo HANGUL SYLLABLE NYA */
  756. 0xB0EC, /* LV # Lo HANGUL SYLLABLE NYAE */
  757. 0xB108, /* LV # Lo HANGUL SYLLABLE NEO */
  758. 0xB124, /* LV # Lo HANGUL SYLLABLE NE */
  759. 0xB140, /* LV # Lo HANGUL SYLLABLE NYEO */
  760. 0xB15C, /* LV # Lo HANGUL SYLLABLE NYE */
  761. 0xB178, /* LV # Lo HANGUL SYLLABLE NO */
  762. 0xB194, /* LV # Lo HANGUL SYLLABLE NWA */
  763. 0xB1B0, /* LV # Lo HANGUL SYLLABLE NWAE */
  764. 0xB1CC, /* LV # Lo HANGUL SYLLABLE NOE */
  765. 0xB1E8, /* LV # Lo HANGUL SYLLABLE NYO */
  766. 0xB204, /* LV # Lo HANGUL SYLLABLE NU */
  767. 0xB220, /* LV # Lo HANGUL SYLLABLE NWEO */
  768. 0xB23C, /* LV # Lo HANGUL SYLLABLE NWE */
  769. 0xB258, /* LV # Lo HANGUL SYLLABLE NWI */
  770. 0xB274, /* LV # Lo HANGUL SYLLABLE NYU */
  771. 0xB290, /* LV # Lo HANGUL SYLLABLE NEU */
  772. 0xB2AC, /* LV # Lo HANGUL SYLLABLE NYI */
  773. 0xB2C8, /* LV # Lo HANGUL SYLLABLE NI */
  774. 0xB2E4, /* LV # Lo HANGUL SYLLABLE DA */
  775. 0xB300, /* LV # Lo HANGUL SYLLABLE DAE */
  776. 0xB31C, /* LV # Lo HANGUL SYLLABLE DYA */
  777. 0xB338, /* LV # Lo HANGUL SYLLABLE DYAE */
  778. 0xB354, /* LV # Lo HANGUL SYLLABLE DEO */
  779. 0xB370, /* LV # Lo HANGUL SYLLABLE DE */
  780. 0xB38C, /* LV # Lo HANGUL SYLLABLE DYEO */
  781. 0xB3A8, /* LV # Lo HANGUL SYLLABLE DYE */
  782. 0xB3C4, /* LV # Lo HANGUL SYLLABLE DO */
  783. 0xB3E0, /* LV # Lo HANGUL SYLLABLE DWA */
  784. 0xB3FC, /* LV # Lo HANGUL SYLLABLE DWAE */
  785. 0xB418, /* LV # Lo HANGUL SYLLABLE DOE */
  786. 0xB434, /* LV # Lo HANGUL SYLLABLE DYO */
  787. 0xB450, /* LV # Lo HANGUL SYLLABLE DU */
  788. 0xB46C, /* LV # Lo HANGUL SYLLABLE DWEO */
  789. 0xB488, /* LV # Lo HANGUL SYLLABLE DWE */
  790. 0xB4A4, /* LV # Lo HANGUL SYLLABLE DWI */
  791. 0xB4C0, /* LV # Lo HANGUL SYLLABLE DYU */
  792. 0xB4DC, /* LV # Lo HANGUL SYLLABLE DEU */
  793. 0xB4F8, /* LV # Lo HANGUL SYLLABLE DYI */
  794. 0xB514, /* LV # Lo HANGUL SYLLABLE DI */
  795. 0xB530, /* LV # Lo HANGUL SYLLABLE DDA */
  796. 0xB54C, /* LV # Lo HANGUL SYLLABLE DDAE */
  797. 0xB568, /* LV # Lo HANGUL SYLLABLE DDYA */
  798. 0xB584, /* LV # Lo HANGUL SYLLABLE DDYAE */
  799. 0xB5A0, /* LV # Lo HANGUL SYLLABLE DDEO */
  800. 0xB5BC, /* LV # Lo HANGUL SYLLABLE DDE */
  801. 0xB5D8, /* LV # Lo HANGUL SYLLABLE DDYEO */
  802. 0xB5F4, /* LV # Lo HANGUL SYLLABLE DDYE */
  803. 0xB610, /* LV # Lo HANGUL SYLLABLE DDO */
  804. 0xB62C, /* LV # Lo HANGUL SYLLABLE DDWA */
  805. 0xB648, /* LV # Lo HANGUL SYLLABLE DDWAE */
  806. 0xB664, /* LV # Lo HANGUL SYLLABLE DDOE */
  807. 0xB680, /* LV # Lo HANGUL SYLLABLE DDYO */
  808. 0xB69C, /* LV # Lo HANGUL SYLLABLE DDU */
  809. 0xB6B8, /* LV # Lo HANGUL SYLLABLE DDWEO */
  810. 0xB6D4, /* LV # Lo HANGUL SYLLABLE DDWE */
  811. 0xB6F0, /* LV # Lo HANGUL SYLLABLE DDWI */
  812. 0xB70C, /* LV # Lo HANGUL SYLLABLE DDYU */
  813. 0xB728, /* LV # Lo HANGUL SYLLABLE DDEU */
  814. 0xB744, /* LV # Lo HANGUL SYLLABLE DDYI */
  815. 0xB760, /* LV # Lo HANGUL SYLLABLE DDI */
  816. 0xB77C, /* LV # Lo HANGUL SYLLABLE RA */
  817. 0xB798, /* LV # Lo HANGUL SYLLABLE RAE */
  818. 0xB7B4, /* LV # Lo HANGUL SYLLABLE RYA */
  819. 0xB7D0, /* LV # Lo HANGUL SYLLABLE RYAE */
  820. 0xB7EC, /* LV # Lo HANGUL SYLLABLE REO */
  821. 0xB808, /* LV # Lo HANGUL SYLLABLE RE */
  822. 0xB824, /* LV # Lo HANGUL SYLLABLE RYEO */
  823. 0xB840, /* LV # Lo HANGUL SYLLABLE RYE */
  824. 0xB85C, /* LV # Lo HANGUL SYLLABLE RO */
  825. 0xB878, /* LV # Lo HANGUL SYLLABLE RWA */
  826. 0xB894, /* LV # Lo HANGUL SYLLABLE RWAE */
  827. 0xB8B0, /* LV # Lo HANGUL SYLLABLE ROE */
  828. 0xB8CC, /* LV # Lo HANGUL SYLLABLE RYO */
  829. 0xB8E8, /* LV # Lo HANGUL SYLLABLE RU */
  830. 0xB904, /* LV # Lo HANGUL SYLLABLE RWEO */
  831. 0xB920, /* LV # Lo HANGUL SYLLABLE RWE */
  832. 0xB93C, /* LV # Lo HANGUL SYLLABLE RWI */
  833. 0xB958, /* LV # Lo HANGUL SYLLABLE RYU */
  834. 0xB974, /* LV # Lo HANGUL SYLLABLE REU */
  835. 0xB990, /* LV # Lo HANGUL SYLLABLE RYI */
  836. 0xB9AC, /* LV # Lo HANGUL SYLLABLE RI */
  837. 0xB9C8, /* LV # Lo HANGUL SYLLABLE MA */
  838. 0xB9E4, /* LV # Lo HANGUL SYLLABLE MAE */
  839. 0xBA00, /* LV # Lo HANGUL SYLLABLE MYA */
  840. 0xBA1C, /* LV # Lo HANGUL SYLLABLE MYAE */
  841. 0xBA38, /* LV # Lo HANGUL SYLLABLE MEO */
  842. 0xBA54, /* LV # Lo HANGUL SYLLABLE ME */
  843. 0xBA70, /* LV # Lo HANGUL SYLLABLE MYEO */
  844. 0xBA8C, /* LV # Lo HANGUL SYLLABLE MYE */
  845. 0xBAA8, /* LV # Lo HANGUL SYLLABLE MO */
  846. 0xBAC4, /* LV # Lo HANGUL SYLLABLE MWA */
  847. 0xBAE0, /* LV # Lo HANGUL SYLLABLE MWAE */
  848. 0xBAFC, /* LV # Lo HANGUL SYLLABLE MOE */
  849. 0xBB18, /* LV # Lo HANGUL SYLLABLE MYO */
  850. 0xBB34, /* LV # Lo HANGUL SYLLABLE MU */
  851. 0xBB50, /* LV # Lo HANGUL SYLLABLE MWEO */
  852. 0xBB6C, /* LV # Lo HANGUL SYLLABLE MWE */
  853. 0xBB88, /* LV # Lo HANGUL SYLLABLE MWI */
  854. 0xBBA4, /* LV # Lo HANGUL SYLLABLE MYU */
  855. 0xBBC0, /* LV # Lo HANGUL SYLLABLE MEU */
  856. 0xBBDC, /* LV # Lo HANGUL SYLLABLE MYI */
  857. 0xBBF8, /* LV # Lo HANGUL SYLLABLE MI */
  858. 0xBC14, /* LV # Lo HANGUL SYLLABLE BA */
  859. 0xBC30, /* LV # Lo HANGUL SYLLABLE BAE */
  860. 0xBC4C, /* LV # Lo HANGUL SYLLABLE BYA */
  861. 0xBC68, /* LV # Lo HANGUL SYLLABLE BYAE */
  862. 0xBC84, /* LV # Lo HANGUL SYLLABLE BEO */
  863. 0xBCA0, /* LV # Lo HANGUL SYLLABLE BE */
  864. 0xBCBC, /* LV # Lo HANGUL SYLLABLE BYEO */
  865. 0xBCD8, /* LV # Lo HANGUL SYLLABLE BYE */
  866. 0xBCF4, /* LV # Lo HANGUL SYLLABLE BO */
  867. 0xBD10, /* LV # Lo HANGUL SYLLABLE BWA */
  868. 0xBD2C, /* LV # Lo HANGUL SYLLABLE BWAE */
  869. 0xBD48, /* LV # Lo HANGUL SYLLABLE BOE */
  870. 0xBD64, /* LV # Lo HANGUL SYLLABLE BYO */
  871. 0xBD80, /* LV # Lo HANGUL SYLLABLE BU */
  872. 0xBD9C, /* LV # Lo HANGUL SYLLABLE BWEO */
  873. 0xBDB8, /* LV # Lo HANGUL SYLLABLE BWE */
  874. 0xBDD4, /* LV # Lo HANGUL SYLLABLE BWI */
  875. 0xBDF0, /* LV # Lo HANGUL SYLLABLE BYU */
  876. 0xBE0C, /* LV # Lo HANGUL SYLLABLE BEU */
  877. 0xBE28, /* LV # Lo HANGUL SYLLABLE BYI */
  878. 0xBE44, /* LV # Lo HANGUL SYLLABLE BI */
  879. 0xBE60, /* LV # Lo HANGUL SYLLABLE BBA */
  880. 0xBE7C, /* LV # Lo HANGUL SYLLABLE BBAE */
  881. 0xBE98, /* LV # Lo HANGUL SYLLABLE BBYA */
  882. 0xBEB4, /* LV # Lo HANGUL SYLLABLE BBYAE */
  883. 0xBED0, /* LV # Lo HANGUL SYLLABLE BBEO */
  884. 0xBEEC, /* LV # Lo HANGUL SYLLABLE BBE */
  885. 0xBF08, /* LV # Lo HANGUL SYLLABLE BBYEO */
  886. 0xBF24, /* LV # Lo HANGUL SYLLABLE BBYE */
  887. 0xBF40, /* LV # Lo HANGUL SYLLABLE BBO */
  888. 0xBF5C, /* LV # Lo HANGUL SYLLABLE BBWA */
  889. 0xBF78, /* LV # Lo HANGUL SYLLABLE BBWAE */
  890. 0xBF94, /* LV # Lo HANGUL SYLLABLE BBOE */
  891. 0xBFB0, /* LV # Lo HANGUL SYLLABLE BBYO */
  892. 0xBFCC, /* LV # Lo HANGUL SYLLABLE BBU */
  893. 0xBFE8, /* LV # Lo HANGUL SYLLABLE BBWEO */
  894. 0xC004, /* LV # Lo HANGUL SYLLABLE BBWE */
  895. 0xC020, /* LV # Lo HANGUL SYLLABLE BBWI */
  896. 0xC03C, /* LV # Lo HANGUL SYLLABLE BBYU */
  897. 0xC058, /* LV # Lo HANGUL SYLLABLE BBEU */
  898. 0xC074, /* LV # Lo HANGUL SYLLABLE BBYI */
  899. 0xC090, /* LV # Lo HANGUL SYLLABLE BBI */
  900. 0xC0AC, /* LV # Lo HANGUL SYLLABLE SA */
  901. 0xC0C8, /* LV # Lo HANGUL SYLLABLE SAE */
  902. 0xC0E4, /* LV # Lo HANGUL SYLLABLE SYA */
  903. 0xC100, /* LV # Lo HANGUL SYLLABLE SYAE */
  904. 0xC11C, /* LV # Lo HANGUL SYLLABLE SEO */
  905. 0xC138, /* LV # Lo HANGUL SYLLABLE SE */
  906. 0xC154, /* LV # Lo HANGUL SYLLABLE SYEO */
  907. 0xC170, /* LV # Lo HANGUL SYLLABLE SYE */
  908. 0xC18C, /* LV # Lo HANGUL SYLLABLE SO */
  909. 0xC1A8, /* LV # Lo HANGUL SYLLABLE SWA */
  910. 0xC1C4, /* LV # Lo HANGUL SYLLABLE SWAE */
  911. 0xC1E0, /* LV # Lo HANGUL SYLLABLE SOE */
  912. 0xC1FC, /* LV # Lo HANGUL SYLLABLE SYO */
  913. 0xC218, /* LV # Lo HANGUL SYLLABLE SU */
  914. 0xC234, /* LV # Lo HANGUL SYLLABLE SWEO */
  915. 0xC250, /* LV # Lo HANGUL SYLLABLE SWE */
  916. 0xC26C, /* LV # Lo HANGUL SYLLABLE SWI */
  917. 0xC288, /* LV # Lo HANGUL SYLLABLE SYU */
  918. 0xC2A4, /* LV # Lo HANGUL SYLLABLE SEU */
  919. 0xC2C0, /* LV # Lo HANGUL SYLLABLE SYI */
  920. 0xC2DC, /* LV # Lo HANGUL SYLLABLE SI */
  921. 0xC2F8, /* LV # Lo HANGUL SYLLABLE SSA */
  922. 0xC314, /* LV # Lo HANGUL SYLLABLE SSAE */
  923. 0xC330, /* LV # Lo HANGUL SYLLABLE SSYA */
  924. 0xC34C, /* LV # Lo HANGUL SYLLABLE SSYAE */
  925. 0xC368, /* LV # Lo HANGUL SYLLABLE SSEO */
  926. 0xC384, /* LV # Lo HANGUL SYLLABLE SSE */
  927. 0xC3A0, /* LV # Lo HANGUL SYLLABLE SSYEO */
  928. 0xC3BC, /* LV # Lo HANGUL SYLLABLE SSYE */
  929. 0xC3D8, /* LV # Lo HANGUL SYLLABLE SSO */
  930. 0xC3F4, /* LV # Lo HANGUL SYLLABLE SSWA */
  931. 0xC410, /* LV # Lo HANGUL SYLLABLE SSWAE */
  932. 0xC42C, /* LV # Lo HANGUL SYLLABLE SSOE */
  933. 0xC448, /* LV # Lo HANGUL SYLLABLE SSYO */
  934. 0xC464, /* LV # Lo HANGUL SYLLABLE SSU */
  935. 0xC480, /* LV # Lo HANGUL SYLLABLE SSWEO */
  936. 0xC49C, /* LV # Lo HANGUL SYLLABLE SSWE */
  937. 0xC4B8, /* LV # Lo HANGUL SYLLABLE SSWI */
  938. 0xC4D4, /* LV # Lo HANGUL SYLLABLE SSYU */
  939. 0xC4F0, /* LV # Lo HANGUL SYLLABLE SSEU */
  940. 0xC50C, /* LV # Lo HANGUL SYLLABLE SSYI */
  941. 0xC528, /* LV # Lo HANGUL SYLLABLE SSI */
  942. 0xC544, /* LV # Lo HANGUL SYLLABLE A */
  943. 0xC560, /* LV # Lo HANGUL SYLLABLE AE */
  944. 0xC57C, /* LV # Lo HANGUL SYLLABLE YA */
  945. 0xC598, /* LV # Lo HANGUL SYLLABLE YAE */
  946. 0xC5B4, /* LV # Lo HANGUL SYLLABLE EO */
  947. 0xC5D0, /* LV # Lo HANGUL SYLLABLE E */
  948. 0xC5EC, /* LV # Lo HANGUL SYLLABLE YEO */
  949. 0xC608, /* LV # Lo HANGUL SYLLABLE YE */
  950. 0xC624, /* LV # Lo HANGUL SYLLABLE O */
  951. 0xC640, /* LV # Lo HANGUL SYLLABLE WA */
  952. 0xC65C, /* LV # Lo HANGUL SYLLABLE WAE */
  953. 0xC678, /* LV # Lo HANGUL SYLLABLE OE */
  954. 0xC694, /* LV # Lo HANGUL SYLLABLE YO */
  955. 0xC6B0, /* LV # Lo HANGUL SYLLABLE U */
  956. 0xC6CC, /* LV # Lo HANGUL SYLLABLE WEO */
  957. 0xC6E8, /* LV # Lo HANGUL SYLLABLE WE */
  958. 0xC704, /* LV # Lo HANGUL SYLLABLE WI */
  959. 0xC720, /* LV # Lo HANGUL SYLLABLE YU */
  960. 0xC73C, /* LV # Lo HANGUL SYLLABLE EU */
  961. 0xC758, /* LV # Lo HANGUL SYLLABLE YI */
  962. 0xC774, /* LV # Lo HANGUL SYLLABLE I */
  963. 0xC790, /* LV # Lo HANGUL SYLLABLE JA */
  964. 0xC7AC, /* LV # Lo HANGUL SYLLABLE JAE */
  965. 0xC7C8, /* LV # Lo HANGUL SYLLABLE JYA */
  966. 0xC7E4, /* LV # Lo HANGUL SYLLABLE JYAE */
  967. 0xC800, /* LV # Lo HANGUL SYLLABLE JEO */
  968. 0xC81C, /* LV # Lo HANGUL SYLLABLE JE */
  969. 0xC838, /* LV # Lo HANGUL SYLLABLE JYEO */
  970. 0xC854, /* LV # Lo HANGUL SYLLABLE JYE */
  971. 0xC870, /* LV # Lo HANGUL SYLLABLE JO */
  972. 0xC88C, /* LV # Lo HANGUL SYLLABLE JWA */
  973. 0xC8A8, /* LV # Lo HANGUL SYLLABLE JWAE */
  974. 0xC8C4, /* LV # Lo HANGUL SYLLABLE JOE */
  975. 0xC8E0, /* LV # Lo HANGUL SYLLABLE JYO */
  976. 0xC8FC, /* LV # Lo HANGUL SYLLABLE JU */
  977. 0xC918, /* LV # Lo HANGUL SYLLABLE JWEO */
  978. 0xC934, /* LV # Lo HANGUL SYLLABLE JWE */
  979. 0xC950, /* LV # Lo HANGUL SYLLABLE JWI */
  980. 0xC96C, /* LV # Lo HANGUL SYLLABLE JYU */
  981. 0xC988, /* LV # Lo HANGUL SYLLABLE JEU */
  982. 0xC9A4, /* LV # Lo HANGUL SYLLABLE JYI */
  983. 0xC9C0, /* LV # Lo HANGUL SYLLABLE JI */
  984. 0xC9DC, /* LV # Lo HANGUL SYLLABLE JJA */
  985. 0xC9F8, /* LV # Lo HANGUL SYLLABLE JJAE */
  986. 0xCA14, /* LV # Lo HANGUL SYLLABLE JJYA */
  987. 0xCA30, /* LV # Lo HANGUL SYLLABLE JJYAE */
  988. 0xCA4C, /* LV # Lo HANGUL SYLLABLE JJEO */
  989. 0xCA68, /* LV # Lo HANGUL SYLLABLE JJE */
  990. 0xCA84, /* LV # Lo HANGUL SYLLABLE JJYEO */
  991. 0xCAA0, /* LV # Lo HANGUL SYLLABLE JJYE */
  992. 0xCABC, /* LV # Lo HANGUL SYLLABLE JJO */
  993. 0xCAD8, /* LV # Lo HANGUL SYLLABLE JJWA */
  994. 0xCAF4, /* LV # Lo HANGUL SYLLABLE JJWAE */
  995. 0xCB10, /* LV # Lo HANGUL SYLLABLE JJOE */
  996. 0xCB2C, /* LV # Lo HANGUL SYLLABLE JJYO */
  997. 0xCB48, /* LV # Lo HANGUL SYLLABLE JJU */
  998. 0xCB64, /* LV # Lo HANGUL SYLLABLE JJWEO */
  999. 0xCB80, /* LV # Lo HANGUL SYLLABLE JJWE */
  1000. 0xCB9C, /* LV # Lo HANGUL SYLLABLE JJWI */
  1001. 0xCBB8, /* LV # Lo HANGUL SYLLABLE JJYU */
  1002. 0xCBD4, /* LV # Lo HANGUL SYLLABLE JJEU */
  1003. 0xCBF0, /* LV # Lo HANGUL SYLLABLE JJYI */
  1004. 0xCC0C, /* LV # Lo HANGUL SYLLABLE JJI */
  1005. 0xCC28, /* LV # Lo HANGUL SYLLABLE CA */
  1006. 0xCC44, /* LV # Lo HANGUL SYLLABLE CAE */
  1007. 0xCC60, /* LV # Lo HANGUL SYLLABLE CYA */
  1008. 0xCC7C, /* LV # Lo HANGUL SYLLABLE CYAE */
  1009. 0xCC98, /* LV # Lo HANGUL SYLLABLE CEO */
  1010. 0xCCB4, /* LV # Lo HANGUL SYLLABLE CE */
  1011. 0xCCD0, /* LV # Lo HANGUL SYLLABLE CYEO */
  1012. 0xCCEC, /* LV # Lo HANGUL SYLLABLE CYE */
  1013. 0xCD08, /* LV # Lo HANGUL SYLLABLE CO */
  1014. 0xCD24, /* LV # Lo HANGUL SYLLABLE CWA */
  1015. 0xCD40, /* LV # Lo HANGUL SYLLABLE CWAE */
  1016. 0xCD5C, /* LV # Lo HANGUL SYLLABLE COE */
  1017. 0xCD78, /* LV # Lo HANGUL SYLLABLE CYO */
  1018. 0xCD94, /* LV # Lo HANGUL SYLLABLE CU */
  1019. 0xCDB0, /* LV # Lo HANGUL SYLLABLE CWEO */
  1020. 0xCDCC, /* LV # Lo HANGUL SYLLABLE CWE */
  1021. 0xCDE8, /* LV # Lo HANGUL SYLLABLE CWI */
  1022. 0xCE04, /* LV # Lo HANGUL SYLLABLE CYU */
  1023. 0xCE20, /* LV # Lo HANGUL SYLLABLE CEU */
  1024. 0xCE3C, /* LV # Lo HANGUL SYLLABLE CYI */
  1025. 0xCE58, /* LV # Lo HANGUL SYLLABLE CI */
  1026. 0xCE74, /* LV # Lo HANGUL SYLLABLE KA */
  1027. 0xCE90, /* LV # Lo HANGUL SYLLABLE KAE */
  1028. 0xCEAC, /* LV # Lo HANGUL SYLLABLE KYA */
  1029. 0xCEC8, /* LV # Lo HANGUL SYLLABLE KYAE */
  1030. 0xCEE4, /* LV # Lo HANGUL SYLLABLE KEO */
  1031. 0xCF00, /* LV # Lo HANGUL SYLLABLE KE */
  1032. 0xCF1C, /* LV # Lo HANGUL SYLLABLE KYEO */
  1033. 0xCF38, /* LV # Lo HANGUL SYLLABLE KYE */
  1034. 0xCF54, /* LV # Lo HANGUL SYLLABLE KO */
  1035. 0xCF70, /* LV # Lo HANGUL SYLLABLE KWA */
  1036. 0xCF8C, /* LV # Lo HANGUL SYLLABLE KWAE */
  1037. 0xCFA8, /* LV # Lo HANGUL SYLLABLE KOE */
  1038. 0xCFC4, /* LV # Lo HANGUL SYLLABLE KYO */
  1039. 0xCFE0, /* LV # Lo HANGUL SYLLABLE KU */
  1040. 0xCFFC, /* LV # Lo HANGUL SYLLABLE KWEO */
  1041. 0xD018, /* LV # Lo HANGUL SYLLABLE KWE */
  1042. 0xD034, /* LV # Lo HANGUL SYLLABLE KWI */
  1043. 0xD050, /* LV # Lo HANGUL SYLLABLE KYU */
  1044. 0xD06C, /* LV # Lo HANGUL SYLLABLE KEU */
  1045. 0xD088, /* LV # Lo HANGUL SYLLABLE KYI */
  1046. 0xD0A4, /* LV # Lo HANGUL SYLLABLE KI */
  1047. 0xD0C0, /* LV # Lo HANGUL SYLLABLE TA */
  1048. 0xD0DC, /* LV # Lo HANGUL SYLLABLE TAE */
  1049. 0xD0F8, /* LV # Lo HANGUL SYLLABLE TYA */
  1050. 0xD114, /* LV # Lo HANGUL SYLLABLE TYAE */
  1051. 0xD130, /* LV # Lo HANGUL SYLLABLE TEO */
  1052. 0xD14C, /* LV # Lo HANGUL SYLLABLE TE */
  1053. 0xD168, /* LV # Lo HANGUL SYLLABLE TYEO */
  1054. 0xD184, /* LV # Lo HANGUL SYLLABLE TYE */
  1055. 0xD1A0, /* LV # Lo HANGUL SYLLABLE TO */
  1056. 0xD1BC, /* LV # Lo HANGUL SYLLABLE TWA */
  1057. 0xD1D8, /* LV # Lo HANGUL SYLLABLE TWAE */
  1058. 0xD1F4, /* LV # Lo HANGUL SYLLABLE TOE */
  1059. 0xD210, /* LV # Lo HANGUL SYLLABLE TYO */
  1060. 0xD22C, /* LV # Lo HANGUL SYLLABLE TU */
  1061. 0xD248, /* LV # Lo HANGUL SYLLABLE TWEO */
  1062. 0xD264, /* LV # Lo HANGUL SYLLABLE TWE */
  1063. 0xD280, /* LV # Lo HANGUL SYLLABLE TWI */
  1064. 0xD29C, /* LV # Lo HANGUL SYLLABLE TYU */
  1065. 0xD2B8, /* LV # Lo HANGUL SYLLABLE TEU */
  1066. 0xD2D4, /* LV # Lo HANGUL SYLLABLE TYI */
  1067. 0xD2F0, /* LV # Lo HANGUL SYLLABLE TI */
  1068. 0xD30C, /* LV # Lo HANGUL SYLLABLE PA */
  1069. 0xD328, /* LV # Lo HANGUL SYLLABLE PAE */
  1070. 0xD344, /* LV # Lo HANGUL SYLLABLE PYA */
  1071. 0xD360, /* LV # Lo HANGUL SYLLABLE PYAE */
  1072. 0xD37C, /* LV # Lo HANGUL SYLLABLE PEO */
  1073. 0xD398, /* LV # Lo HANGUL SYLLABLE PE */
  1074. 0xD3B4, /* LV # Lo HANGUL SYLLABLE PYEO */
  1075. 0xD3D0, /* LV # Lo HANGUL SYLLABLE PYE */
  1076. 0xD3EC, /* LV # Lo HANGUL SYLLABLE PO */
  1077. 0xD408, /* LV # Lo HANGUL SYLLABLE PWA */
  1078. 0xD424, /* LV # Lo HANGUL SYLLABLE PWAE */
  1079. 0xD440, /* LV # Lo HANGUL SYLLABLE POE */
  1080. 0xD45C, /* LV # Lo HANGUL SYLLABLE PYO */
  1081. 0xD478, /* LV # Lo HANGUL SYLLABLE PU */
  1082. 0xD494, /* LV # Lo HANGUL SYLLABLE PWEO */
  1083. 0xD4B0, /* LV # Lo HANGUL SYLLABLE PWE */
  1084. 0xD4CC, /* LV # Lo HANGUL SYLLABLE PWI */
  1085. 0xD4E8, /* LV # Lo HANGUL SYLLABLE PYU */
  1086. 0xD504, /* LV # Lo HANGUL SYLLABLE PEU */
  1087. 0xD520, /* LV # Lo HANGUL SYLLABLE PYI */
  1088. 0xD53C, /* LV # Lo HANGUL SYLLABLE PI */
  1089. 0xD558, /* LV # Lo HANGUL SYLLABLE HA */
  1090. 0xD574, /* LV # Lo HANGUL SYLLABLE HAE */
  1091. 0xD590, /* LV # Lo HANGUL SYLLABLE HYA */
  1092. 0xD5AC, /* LV # Lo HANGUL SYLLABLE HYAE */
  1093. 0xD5C8, /* LV # Lo HANGUL SYLLABLE HEO */
  1094. 0xD5E4, /* LV # Lo HANGUL SYLLABLE HE */
  1095. 0xD600, /* LV # Lo HANGUL SYLLABLE HYEO */
  1096. 0xD61C, /* LV # Lo HANGUL SYLLABLE HYE */
  1097. 0xD638, /* LV # Lo HANGUL SYLLABLE HO */
  1098. 0xD654, /* LV # Lo HANGUL SYLLABLE HWA */
  1099. 0xD670, /* LV # Lo HANGUL SYLLABLE HWAE */
  1100. 0xD68C, /* LV # Lo HANGUL SYLLABLE HOE */
  1101. 0xD6A8, /* LV # Lo HANGUL SYLLABLE HYO */
  1102. 0xD6C4, /* LV # Lo HANGUL SYLLABLE HU */
  1103. 0xD6E0, /* LV # Lo HANGUL SYLLABLE HWEO */
  1104. 0xD6FC, /* LV # Lo HANGUL SYLLABLE HWE */
  1105. 0xD718, /* LV # Lo HANGUL SYLLABLE HWI */
  1106. 0xD734, /* LV # Lo HANGUL SYLLABLE HYU */
  1107. 0xD750, /* LV # Lo HANGUL SYLLABLE HEU */
  1108. 0xD76C, /* LV # Lo HANGUL SYLLABLE HYI */
  1109. 0xD788, /* LV # Lo HANGUL SYLLABLE HI */
  1110. 0
  1111. };
  1112. static const uint32_t pr29_13_2[] = {
  1113. 0x11A8, 0x11A9, 0x11AA, 0x11AB, 0x11AC, 0x11AD, 0x11AE, 0x11AF,
  1114. 0x11B0, 0x11B1, 0x11B2, 0x11B3, 0x11B4, 0x11B5, 0x11B6, 0x11B7,
  1115. 0x11B8, 0x11B9, 0x11BA, 0x11BB, 0x11BC, 0x11BD, 0x11BE, 0x11BF,
  1116. 0x11C0, 0x11C1, 0x11C2, 0
  1117. };
  1118. typedef struct
  1119. {
  1120. const uint32_t *first;
  1121. const uint32_t *last;
  1122. } Pr29;
  1123. static const Pr29 pr29[] = {
  1124. {&pr29_1_1[0], &pr29_1_2[0]},
  1125. {&pr29_2_1[0], &pr29_2_2[0]},
  1126. {&pr29_3_1[0], &pr29_3_2[0]},
  1127. {&pr29_4_1[0], &pr29_4_2[0]},
  1128. {&pr29_5_1[0], &pr29_5_2[0]},
  1129. {&pr29_6_1[0], &pr29_6_2[0]},
  1130. {&pr29_7_1[0], &pr29_7_2[0]},
  1131. {&pr29_8_1[0], &pr29_8_2[0]},
  1132. {&pr29_9_1[0], &pr29_9_2[0]},
  1133. {&pr29_10_1[0], &pr29_10_2[0]},
  1134. {&pr29_11_1[0], &pr29_11_2[0]},
  1135. {&pr29_12_1[0], &pr29_12_2[0]},
  1136. {&pr29_13_1[0], &pr29_13_2[0]},
  1137. {NULL, NULL}
  1138. };
  1139. static size_t
  1140. first_column (uint32_t c)
  1141. {
  1142. size_t i, j;
  1143. for (i = 0; pr29[i].first; i++)
  1144. for (j = 0; pr29[i].first[j]; j++)
  1145. if (c == pr29[i].first[j])
  1146. return i + 1;
  1147. return 0;
  1148. }
  1149. static int
  1150. in_last_column_row (uint32_t c, size_t row)
  1151. {
  1152. size_t i;
  1153. for (i = 0; pr29[row - 1].last[i]; i++)
  1154. if (c == pr29[row - 1].last[i])
  1155. return 1;
  1156. return 0;
  1157. }
  1158. static size_t
  1159. combinationclass (uint32_t c)
  1160. {
  1161. size_t i;
  1162. for (i = 0; nzcc[i]; i++)
  1163. if (c == nzcc[i])
  1164. return i + 1;
  1165. return 0;
  1166. }
  1167. /**
  1168. * pr29_4:
  1169. * @in: input array with unicode code points.
  1170. * @len: length of input array with unicode code points.
  1171. *
  1172. * Check the input to see if it may be normalized into different
  1173. * strings by different NFKC implementations, due to an anomaly in the
  1174. * NFKC specifications.
  1175. *
  1176. * Return value: Returns the #Pr29_rc value %PR29_SUCCESS on success,
  1177. * and %PR29_PROBLEM if the input sequence is a "problem sequence"
  1178. * (i.e., may be normalized into different strings by different
  1179. * implementations).
  1180. **/
  1181. int
  1182. pr29_4 (const uint32_t *in, size_t len)
  1183. {
  1184. size_t i, j, k, row;
  1185. /*
  1186. * The problem sequence are of the form:
  1187. *
  1188. * first_character intervening_character+ last_character
  1189. *
  1190. * where the first_character and last_character come from the same
  1191. * row in the following table, and there is at least one
  1192. * intervening_character with non-zero Canonical Combining
  1193. * Class. (The '+' above means one or more occurrences.)
  1194. *
  1195. */
  1196. for (i = 0; i < len; i++)
  1197. if ((row = first_column (in[i])) > 0)
  1198. for (j = i + 1; j < len; j++)
  1199. if (combinationclass (in[j]))
  1200. for (k = j + 1; k < len; k++)
  1201. if (in_last_column_row (in[k], row))
  1202. return PR29_PROBLEM;
  1203. return PR29_SUCCESS;
  1204. }
  1205. /**
  1206. * pr29_4z:
  1207. * @in: zero terminated array of Unicode code points.
  1208. *
  1209. * Check the input to see if it may be normalized into different
  1210. * strings by different NFKC implementations, due to an anomaly in the
  1211. * NFKC specifications.
  1212. *
  1213. * Return value: Returns the #Pr29_rc value %PR29_SUCCESS on success,
  1214. * and %PR29_PROBLEM if the input sequence is a "problem sequence"
  1215. * (i.e., may be normalized into different strings by different
  1216. * implementations).
  1217. **/
  1218. int
  1219. pr29_4z (const uint32_t *in)
  1220. {
  1221. size_t len;
  1222. for (len = 0; in[len]; len++)
  1223. ;
  1224. return pr29_4 (in, len);
  1225. }
  1226. /**
  1227. * pr29_8z:
  1228. * @in: zero terminated input UTF-8 string.
  1229. *
  1230. * Check the input to see if it may be normalized into different
  1231. * strings by different NFKC implementations, due to an anomaly in the
  1232. * NFKC specifications.
  1233. *
  1234. * Return value: Returns the #Pr29_rc value %PR29_SUCCESS on success,
  1235. * and %PR29_PROBLEM if the input sequence is a "problem sequence"
  1236. * (i.e., may be normalized into different strings by different
  1237. * implementations), or %PR29_STRINGPREP_ERROR if there was a
  1238. * problem converting the string from UTF-8 to UCS-4.
  1239. **/
  1240. int
  1241. pr29_8z (const char *in)
  1242. {
  1243. uint32_t *p;
  1244. int rc;
  1245. p = stringprep_utf8_to_ucs4 (in, -1, NULL);
  1246. if (!p)
  1247. return PR29_STRINGPREP_ERROR;
  1248. rc = pr29_4z (p);
  1249. free (p);
  1250. return rc;
  1251. }
  1252. /**
  1253. * Pr29_rc:
  1254. * @PR29_SUCCESS: Successful operation. This value is guaranteed to
  1255. * always be zero, the remaining ones are only guaranteed to hold
  1256. * non-zero values, for logical comparison purposes.
  1257. * @PR29_PROBLEM: A problem sequence was encountered.
  1258. * @PR29_STRINGPREP_ERROR: The character set conversion failed (only
  1259. * for pr29_8z()).
  1260. *
  1261. * Enumerated return codes for pr29_4(), pr29_4z(), pr29_8z(). The
  1262. * value 0 is guaranteed to always correspond to success.
  1263. */