pango 2.2.4-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (530) hide show
  1. checksums.yaml +7 -0
  2. data/README +33 -0
  3. data/Rakefile +65 -0
  4. data/ext/pango/depend +12 -0
  5. data/ext/pango/extconf.rb +90 -0
  6. data/ext/pango/pango.def +18 -0
  7. data/ext/pango/rbpango.c +318 -0
  8. data/ext/pango/rbpango.h +96 -0
  9. data/ext/pango/rbpangoanalysis.c +218 -0
  10. data/ext/pango/rbpangoattribute.c +499 -0
  11. data/ext/pango/rbpangoattriterator.c +141 -0
  12. data/ext/pango/rbpangoattrlist.c +101 -0
  13. data/ext/pango/rbpangocairo.c +122 -0
  14. data/ext/pango/rbpangocairocontext.c +131 -0
  15. data/ext/pango/rbpangocolor.c +120 -0
  16. data/ext/pango/rbpangocontext.c +309 -0
  17. data/ext/pango/rbpangoconversions.h +111 -0
  18. data/ext/pango/rbpangocoverage.c +106 -0
  19. data/ext/pango/rbpangoengine.c +73 -0
  20. data/ext/pango/rbpangofont.c +110 -0
  21. data/ext/pango/rbpangofontdescription.c +282 -0
  22. data/ext/pango/rbpangofontface.c +73 -0
  23. data/ext/pango/rbpangofontfamily.c +79 -0
  24. data/ext/pango/rbpangofontmap.c +102 -0
  25. data/ext/pango/rbpangofontmetrics.c +85 -0
  26. data/ext/pango/rbpangofontset.c +69 -0
  27. data/ext/pango/rbpangofontsetsimple.c +60 -0
  28. data/ext/pango/rbpangoglyphinfo.c +123 -0
  29. data/ext/pango/rbpangoglyphitem.c +125 -0
  30. data/ext/pango/rbpangoglyphstring.c +151 -0
  31. data/ext/pango/rbpangogravity.c +54 -0
  32. data/ext/pango/rbpangoitem.c +95 -0
  33. data/ext/pango/rbpangolanguage.c +86 -0
  34. data/ext/pango/rbpangolayout.c +572 -0
  35. data/ext/pango/rbpangolayoutiter.c +189 -0
  36. data/ext/pango/rbpangolayoutline.c +239 -0
  37. data/ext/pango/rbpangologattr.c +109 -0
  38. data/ext/pango/rbpangomatrix.c +143 -0
  39. data/ext/pango/rbpangoprivate.h +49 -0
  40. data/ext/pango/rbpangorectangle.c +170 -0
  41. data/ext/pango/rbpangorenderer.c +193 -0
  42. data/ext/pango/rbpangoscript.c +84 -0
  43. data/ext/pango/rbpangoscriptiter.c +92 -0
  44. data/ext/pango/rbpangotabarray.c +128 -0
  45. data/extconf.rb +49 -0
  46. data/lib/2.0/pango.so +0 -0
  47. data/lib/2.1/pango.so +0 -0
  48. data/lib/2.2/pango.so +0 -0
  49. data/lib/pango.rb +79 -0
  50. data/sample/attribute.rb +82 -0
  51. data/sample/break.rb +28 -0
  52. data/sample/gdk_layout.rb +27 -0
  53. data/sample/glyphstring.rb +61 -0
  54. data/sample/item.rb +37 -0
  55. data/sample/label.rb +23 -0
  56. data/sample/layout.rb +102 -0
  57. data/sample/pango_cairo.rb +66 -0
  58. data/sample/parse.rb +33 -0
  59. data/sample/sample.txt +10 -0
  60. data/sample/script.rb +23 -0
  61. data/test/pango-test-utils.rb +9 -0
  62. data/test/run-test.rb +28 -0
  63. data/test/test-analysis.rb +26 -0
  64. data/test/test-attribute.rb +19 -0
  65. data/test/test-color.rb +47 -0
  66. data/test/test-language.rb +7 -0
  67. data/test/test-layout.rb +34 -0
  68. data/test/test-log-attr.rb +26 -0
  69. data/test/test-matrix.rb +26 -0
  70. data/test/test-rectangle.rb +26 -0
  71. data/vendor/local/bin/derb.exe +0 -0
  72. data/vendor/local/bin/genbrk.exe +0 -0
  73. data/vendor/local/bin/genccode.exe +0 -0
  74. data/vendor/local/bin/gencfu.exe +0 -0
  75. data/vendor/local/bin/gencmn.exe +0 -0
  76. data/vendor/local/bin/gencnval.exe +0 -0
  77. data/vendor/local/bin/gendict.exe +0 -0
  78. data/vendor/local/bin/gennorm2.exe +0 -0
  79. data/vendor/local/bin/genrb.exe +0 -0
  80. data/vendor/local/bin/gensprep.exe +0 -0
  81. data/vendor/local/bin/hb-ot-shape-closure.exe +0 -0
  82. data/vendor/local/bin/hb-shape.exe +0 -0
  83. data/vendor/local/bin/hb-view.exe +0 -0
  84. data/vendor/local/bin/icu-config +820 -0
  85. data/vendor/local/bin/icuinfo.exe +0 -0
  86. data/vendor/local/bin/icupkg.exe +0 -0
  87. data/vendor/local/bin/libharfbuzz-0.dll +0 -0
  88. data/vendor/local/bin/libpango-1.0-0.dll +0 -0
  89. data/vendor/local/bin/libpangocairo-1.0-0.dll +0 -0
  90. data/vendor/local/bin/libpangoft2-1.0-0.dll +0 -0
  91. data/vendor/local/bin/libpangowin32-1.0-0.dll +0 -0
  92. data/vendor/local/bin/makeconv.exe +0 -0
  93. data/vendor/local/bin/pango-querymodules.exe +0 -0
  94. data/vendor/local/bin/pango-view.exe +0 -0
  95. data/vendor/local/bin/pkgdata.exe +0 -0
  96. data/vendor/local/bin/uconv.exe +0 -0
  97. data/vendor/local/etc/pango/pango.modules +19 -0
  98. data/vendor/local/include/harfbuzz/hb-blob.h +126 -0
  99. data/vendor/local/include/harfbuzz/hb-buffer.h +344 -0
  100. data/vendor/local/include/harfbuzz/hb-common.h +344 -0
  101. data/vendor/local/include/harfbuzz/hb-deprecated.h +51 -0
  102. data/vendor/local/include/harfbuzz/hb-face.h +117 -0
  103. data/vendor/local/include/harfbuzz/hb-font.h +507 -0
  104. data/vendor/local/include/harfbuzz/hb-ft.h +62 -0
  105. data/vendor/local/include/harfbuzz/hb-glib.h +52 -0
  106. data/vendor/local/include/harfbuzz/hb-icu.h +52 -0
  107. data/vendor/local/include/harfbuzz/hb-ot-font.h +41 -0
  108. data/vendor/local/include/harfbuzz/hb-ot-layout.h +302 -0
  109. data/vendor/local/include/harfbuzz/hb-ot-shape.h +53 -0
  110. data/vendor/local/include/harfbuzz/hb-ot-tag.h +59 -0
  111. data/vendor/local/include/harfbuzz/hb-ot.h +43 -0
  112. data/vendor/local/include/harfbuzz/hb-set.h +154 -0
  113. data/vendor/local/include/harfbuzz/hb-shape-plan.h +89 -0
  114. data/vendor/local/include/harfbuzz/hb-shape.h +81 -0
  115. data/vendor/local/include/harfbuzz/hb-unicode.h +445 -0
  116. data/vendor/local/include/harfbuzz/hb-version.h +66 -0
  117. data/vendor/local/include/harfbuzz/hb.h +47 -0
  118. data/vendor/local/include/layout/LEFontInstance.h +550 -0
  119. data/vendor/local/include/layout/LEGlyphFilter.h +45 -0
  120. data/vendor/local/include/layout/LEGlyphStorage.h +546 -0
  121. data/vendor/local/include/layout/LEInsertionList.h +177 -0
  122. data/vendor/local/include/layout/LELanguages.h +112 -0
  123. data/vendor/local/include/layout/LEScripts.h +263 -0
  124. data/vendor/local/include/layout/LESwaps.h +100 -0
  125. data/vendor/local/include/layout/LETableReference.h +418 -0
  126. data/vendor/local/include/layout/LETypes.h +728 -0
  127. data/vendor/local/include/layout/LayoutEngine.h +518 -0
  128. data/vendor/local/include/layout/ParagraphLayout.h +747 -0
  129. data/vendor/local/include/layout/RunArrays.h +676 -0
  130. data/vendor/local/include/layout/loengine.h +225 -0
  131. data/vendor/local/include/layout/playout.h +466 -0
  132. data/vendor/local/include/layout/plruns.h +441 -0
  133. data/vendor/local/include/pango-1.0/pango/pango-attributes.h +514 -0
  134. data/vendor/local/include/pango-1.0/pango/pango-bidi-type.h +136 -0
  135. data/vendor/local/include/pango-1.0/pango/pango-break.h +173 -0
  136. data/vendor/local/include/pango-1.0/pango/pango-context.h +112 -0
  137. data/vendor/local/include/pango-1.0/pango/pango-coverage.h +79 -0
  138. data/vendor/local/include/pango-1.0/pango/pango-engine.h +429 -0
  139. data/vendor/local/include/pango-1.0/pango/pango-enum-types.h +69 -0
  140. data/vendor/local/include/pango-1.0/pango/pango-features.h +12 -0
  141. data/vendor/local/include/pango-1.0/pango/pango-font.h +622 -0
  142. data/vendor/local/include/pango-1.0/pango/pango-fontmap.h +167 -0
  143. data/vendor/local/include/pango-1.0/pango/pango-fontset.h +169 -0
  144. data/vendor/local/include/pango-1.0/pango/pango-glyph-item.h +158 -0
  145. data/vendor/local/include/pango-1.0/pango/pango-glyph.h +197 -0
  146. data/vendor/local/include/pango-1.0/pango/pango-gravity.h +128 -0
  147. data/vendor/local/include/pango-1.0/pango/pango-item.h +109 -0
  148. data/vendor/local/include/pango-1.0/pango/pango-language.h +61 -0
  149. data/vendor/local/include/pango-1.0/pango/pango-layout.h +340 -0
  150. data/vendor/local/include/pango-1.0/pango/pango-matrix.h +117 -0
  151. data/vendor/local/include/pango-1.0/pango/pango-modules.h +71 -0
  152. data/vendor/local/include/pango-1.0/pango/pango-ot.h +391 -0
  153. data/vendor/local/include/pango-1.0/pango/pango-renderer.h +260 -0
  154. data/vendor/local/include/pango-1.0/pango/pango-script.h +260 -0
  155. data/vendor/local/include/pango-1.0/pango/pango-tabs.h +87 -0
  156. data/vendor/local/include/pango-1.0/pango/pango-types.h +200 -0
  157. data/vendor/local/include/pango-1.0/pango/pango-utils.h +189 -0
  158. data/vendor/local/include/pango-1.0/pango/pango.h +48 -0
  159. data/vendor/local/include/pango-1.0/pango/pangocairo.h +169 -0
  160. data/vendor/local/include/pango-1.0/pango/pangofc-decoder.h +110 -0
  161. data/vendor/local/include/pango-1.0/pango/pangofc-font.h +153 -0
  162. data/vendor/local/include/pango-1.0/pango/pangofc-fontmap.h +289 -0
  163. data/vendor/local/include/pango-1.0/pango/pangoft2.h +133 -0
  164. data/vendor/local/include/pango-1.0/pango/pangowin32.h +128 -0
  165. data/vendor/local/include/unicode/alphaindex.h +752 -0
  166. data/vendor/local/include/unicode/appendable.h +232 -0
  167. data/vendor/local/include/unicode/basictz.h +214 -0
  168. data/vendor/local/include/unicode/brkiter.h +655 -0
  169. data/vendor/local/include/unicode/bytestream.h +257 -0
  170. data/vendor/local/include/unicode/bytestrie.h +519 -0
  171. data/vendor/local/include/unicode/bytestriebuilder.h +181 -0
  172. data/vendor/local/include/unicode/calendar.h +2519 -0
  173. data/vendor/local/include/unicode/caniter.h +208 -0
  174. data/vendor/local/include/unicode/chariter.h +722 -0
  175. data/vendor/local/include/unicode/choicfmt.h +594 -0
  176. data/vendor/local/include/unicode/coleitr.h +404 -0
  177. data/vendor/local/include/unicode/coll.h +1267 -0
  178. data/vendor/local/include/unicode/compactdecimalformat.h +330 -0
  179. data/vendor/local/include/unicode/curramt.h +130 -0
  180. data/vendor/local/include/unicode/currpinf.h +258 -0
  181. data/vendor/local/include/unicode/currunit.h +110 -0
  182. data/vendor/local/include/unicode/datefmt.h +883 -0
  183. data/vendor/local/include/unicode/dbbi.h +40 -0
  184. data/vendor/local/include/unicode/dcfmtsym.h +482 -0
  185. data/vendor/local/include/unicode/decimfmt.h +2479 -0
  186. data/vendor/local/include/unicode/docmain.h +215 -0
  187. data/vendor/local/include/unicode/dtfmtsym.h +912 -0
  188. data/vendor/local/include/unicode/dtintrv.h +158 -0
  189. data/vendor/local/include/unicode/dtitvfmt.h +985 -0
  190. data/vendor/local/include/unicode/dtitvinf.h +514 -0
  191. data/vendor/local/include/unicode/dtptngen.h +498 -0
  192. data/vendor/local/include/unicode/dtrule.h +250 -0
  193. data/vendor/local/include/unicode/enumset.h +64 -0
  194. data/vendor/local/include/unicode/errorcode.h +137 -0
  195. data/vendor/local/include/unicode/fieldpos.h +291 -0
  196. data/vendor/local/include/unicode/filteredbrk.h +131 -0
  197. data/vendor/local/include/unicode/fmtable.h +760 -0
  198. data/vendor/local/include/unicode/format.h +305 -0
  199. data/vendor/local/include/unicode/fpositer.h +117 -0
  200. data/vendor/local/include/unicode/gender.h +111 -0
  201. data/vendor/local/include/unicode/gregocal.h +777 -0
  202. data/vendor/local/include/unicode/icudataver.h +41 -0
  203. data/vendor/local/include/unicode/icuplug.h +371 -0
  204. data/vendor/local/include/unicode/idna.h +323 -0
  205. data/vendor/local/include/unicode/listformatter.h +167 -0
  206. data/vendor/local/include/unicode/localpointer.h +304 -0
  207. data/vendor/local/include/unicode/locdspnm.h +204 -0
  208. data/vendor/local/include/unicode/locid.h +815 -0
  209. data/vendor/local/include/unicode/measfmt.h +389 -0
  210. data/vendor/local/include/unicode/measunit.h +1443 -0
  211. data/vendor/local/include/unicode/measure.h +159 -0
  212. data/vendor/local/include/unicode/messagepattern.h +943 -0
  213. data/vendor/local/include/unicode/msgfmt.h +1093 -0
  214. data/vendor/local/include/unicode/normalizer2.h +658 -0
  215. data/vendor/local/include/unicode/normlzr.h +797 -0
  216. data/vendor/local/include/unicode/numfmt.h +1187 -0
  217. data/vendor/local/include/unicode/numsys.h +208 -0
  218. data/vendor/local/include/unicode/parseerr.h +92 -0
  219. data/vendor/local/include/unicode/parsepos.h +230 -0
  220. data/vendor/local/include/unicode/platform.h +751 -0
  221. data/vendor/local/include/unicode/plurfmt.h +615 -0
  222. data/vendor/local/include/unicode/plurrule.h +501 -0
  223. data/vendor/local/include/unicode/ptypes.h +126 -0
  224. data/vendor/local/include/unicode/putil.h +181 -0
  225. data/vendor/local/include/unicode/rbbi.h +782 -0
  226. data/vendor/local/include/unicode/rbnf.h +1032 -0
  227. data/vendor/local/include/unicode/rbtz.h +362 -0
  228. data/vendor/local/include/unicode/regex.h +1857 -0
  229. data/vendor/local/include/unicode/region.h +228 -0
  230. data/vendor/local/include/unicode/reldatefmt.h +498 -0
  231. data/vendor/local/include/unicode/rep.h +261 -0
  232. data/vendor/local/include/unicode/resbund.h +490 -0
  233. data/vendor/local/include/unicode/schriter.h +187 -0
  234. data/vendor/local/include/unicode/scientificformathelper.h +139 -0
  235. data/vendor/local/include/unicode/search.h +575 -0
  236. data/vendor/local/include/unicode/selfmt.h +367 -0
  237. data/vendor/local/include/unicode/simpletz.h +928 -0
  238. data/vendor/local/include/unicode/smpdtfmt.h +1592 -0
  239. data/vendor/local/include/unicode/sortkey.h +338 -0
  240. data/vendor/local/include/unicode/std_string.h +37 -0
  241. data/vendor/local/include/unicode/strenum.h +276 -0
  242. data/vendor/local/include/unicode/stringpiece.h +224 -0
  243. data/vendor/local/include/unicode/stringtriebuilder.h +402 -0
  244. data/vendor/local/include/unicode/stsearch.h +504 -0
  245. data/vendor/local/include/unicode/symtable.h +112 -0
  246. data/vendor/local/include/unicode/tblcoll.h +873 -0
  247. data/vendor/local/include/unicode/timezone.h +948 -0
  248. data/vendor/local/include/unicode/tmunit.h +129 -0
  249. data/vendor/local/include/unicode/tmutamt.h +168 -0
  250. data/vendor/local/include/unicode/tmutfmt.h +243 -0
  251. data/vendor/local/include/unicode/translit.h +1342 -0
  252. data/vendor/local/include/unicode/tzfmt.h +1098 -0
  253. data/vendor/local/include/unicode/tznames.h +404 -0
  254. data/vendor/local/include/unicode/tzrule.h +828 -0
  255. data/vendor/local/include/unicode/tztrans.h +195 -0
  256. data/vendor/local/include/unicode/ubidi.h +2186 -0
  257. data/vendor/local/include/unicode/ubrk.h +540 -0
  258. data/vendor/local/include/unicode/ucal.h +1560 -0
  259. data/vendor/local/include/unicode/ucasemap.h +423 -0
  260. data/vendor/local/include/unicode/ucat.h +158 -0
  261. data/vendor/local/include/unicode/uchar.h +3426 -0
  262. data/vendor/local/include/unicode/ucharstrie.h +576 -0
  263. data/vendor/local/include/unicode/ucharstriebuilder.h +185 -0
  264. data/vendor/local/include/unicode/uchriter.h +381 -0
  265. data/vendor/local/include/unicode/uclean.h +258 -0
  266. data/vendor/local/include/unicode/ucnv.h +2036 -0
  267. data/vendor/local/include/unicode/ucnv_cb.h +162 -0
  268. data/vendor/local/include/unicode/ucnv_err.h +463 -0
  269. data/vendor/local/include/unicode/ucnvsel.h +187 -0
  270. data/vendor/local/include/unicode/ucol.h +1474 -0
  271. data/vendor/local/include/unicode/ucoleitr.h +266 -0
  272. data/vendor/local/include/unicode/uconfig.h +430 -0
  273. data/vendor/local/include/unicode/ucsdet.h +413 -0
  274. data/vendor/local/include/unicode/ucurr.h +424 -0
  275. data/vendor/local/include/unicode/udat.h +1536 -0
  276. data/vendor/local/include/unicode/udata.h +430 -0
  277. data/vendor/local/include/unicode/udateintervalformat.h +181 -0
  278. data/vendor/local/include/unicode/udatpg.h +588 -0
  279. data/vendor/local/include/unicode/udisplaycontext.h +150 -0
  280. data/vendor/local/include/unicode/uenum.h +206 -0
  281. data/vendor/local/include/unicode/uformattable.h +280 -0
  282. data/vendor/local/include/unicode/ugender.h +82 -0
  283. data/vendor/local/include/unicode/uidna.h +762 -0
  284. data/vendor/local/include/unicode/uiter.h +707 -0
  285. data/vendor/local/include/unicode/uldnames.h +302 -0
  286. data/vendor/local/include/unicode/uloc.h +1256 -0
  287. data/vendor/local/include/unicode/ulocdata.h +277 -0
  288. data/vendor/local/include/unicode/umachine.h +356 -0
  289. data/vendor/local/include/unicode/umisc.h +60 -0
  290. data/vendor/local/include/unicode/umsg.h +623 -0
  291. data/vendor/local/include/unicode/unifilt.h +120 -0
  292. data/vendor/local/include/unicode/unifunct.h +125 -0
  293. data/vendor/local/include/unicode/unimatch.h +163 -0
  294. data/vendor/local/include/unicode/unirepl.h +97 -0
  295. data/vendor/local/include/unicode/uniset.h +1691 -0
  296. data/vendor/local/include/unicode/unistr.h +4470 -0
  297. data/vendor/local/include/unicode/unorm.h +561 -0
  298. data/vendor/local/include/unicode/unorm2.h +528 -0
  299. data/vendor/local/include/unicode/unum.h +1328 -0
  300. data/vendor/local/include/unicode/unumsys.h +170 -0
  301. data/vendor/local/include/unicode/uobject.h +320 -0
  302. data/vendor/local/include/unicode/upluralrules.h +145 -0
  303. data/vendor/local/include/unicode/uregex.h +1591 -0
  304. data/vendor/local/include/unicode/uregion.h +248 -0
  305. data/vendor/local/include/unicode/urename.h +1784 -0
  306. data/vendor/local/include/unicode/urep.h +155 -0
  307. data/vendor/local/include/unicode/ures.h +887 -0
  308. data/vendor/local/include/unicode/uscript.h +642 -0
  309. data/vendor/local/include/unicode/usearch.h +885 -0
  310. data/vendor/local/include/unicode/uset.h +1126 -0
  311. data/vendor/local/include/unicode/usetiter.h +318 -0
  312. data/vendor/local/include/unicode/ushape.h +474 -0
  313. data/vendor/local/include/unicode/uspoof.h +1064 -0
  314. data/vendor/local/include/unicode/usprep.h +269 -0
  315. data/vendor/local/include/unicode/ustdio.h +1018 -0
  316. data/vendor/local/include/unicode/ustream.h +68 -0
  317. data/vendor/local/include/unicode/ustring.h +1700 -0
  318. data/vendor/local/include/unicode/ustringtrie.h +95 -0
  319. data/vendor/local/include/unicode/utext.h +1600 -0
  320. data/vendor/local/include/unicode/utf.h +223 -0
  321. data/vendor/local/include/unicode/utf16.h +623 -0
  322. data/vendor/local/include/unicode/utf32.h +23 -0
  323. data/vendor/local/include/unicode/utf8.h +824 -0
  324. data/vendor/local/include/unicode/utf_old.h +1169 -0
  325. data/vendor/local/include/unicode/utmscale.h +481 -0
  326. data/vendor/local/include/unicode/utrace.h +359 -0
  327. data/vendor/local/include/unicode/utrans.h +658 -0
  328. data/vendor/local/include/unicode/utypes.h +723 -0
  329. data/vendor/local/include/unicode/uvernum.h +170 -0
  330. data/vendor/local/include/unicode/uversion.h +193 -0
  331. data/vendor/local/include/unicode/vtzone.h +455 -0
  332. data/vendor/local/lib/girepository-1.0/Pango-1.0.typelib +0 -0
  333. data/vendor/local/lib/girepository-1.0/PangoCairo-1.0.typelib +0 -0
  334. data/vendor/local/lib/girepository-1.0/PangoFT2-1.0.typelib +0 -0
  335. data/vendor/local/lib/icu/54.1/Makefile.inc +293 -0
  336. data/vendor/local/lib/icu/54.1/pkgdata.inc +17 -0
  337. data/vendor/local/lib/icu/Makefile.inc +293 -0
  338. data/vendor/local/lib/icu/pkgdata.inc +17 -0
  339. data/vendor/local/lib/icudt.dll +0 -0
  340. data/vendor/local/lib/icudt54.dll +0 -0
  341. data/vendor/local/lib/icuin.dll +0 -0
  342. data/vendor/local/lib/icuin54.dll +0 -0
  343. data/vendor/local/lib/icuio.dll +0 -0
  344. data/vendor/local/lib/icuio54.dll +0 -0
  345. data/vendor/local/lib/icule.dll +0 -0
  346. data/vendor/local/lib/icule54.dll +0 -0
  347. data/vendor/local/lib/iculx.dll +0 -0
  348. data/vendor/local/lib/iculx54.dll +0 -0
  349. data/vendor/local/lib/icutest.dll +0 -0
  350. data/vendor/local/lib/icutest54.dll +0 -0
  351. data/vendor/local/lib/icutu.dll +0 -0
  352. data/vendor/local/lib/icutu54.dll +0 -0
  353. data/vendor/local/lib/icuuc.dll +0 -0
  354. data/vendor/local/lib/icuuc54.dll +0 -0
  355. data/vendor/local/lib/libharfbuzz-icu.a +0 -0
  356. data/vendor/local/lib/libharfbuzz-icu.la +41 -0
  357. data/vendor/local/lib/libharfbuzz.dll.a +0 -0
  358. data/vendor/local/lib/libharfbuzz.la +41 -0
  359. data/vendor/local/lib/libicudt.dll.a +0 -0
  360. data/vendor/local/lib/libicuin.dll.a +0 -0
  361. data/vendor/local/lib/libicuio.dll.a +0 -0
  362. data/vendor/local/lib/libicule.dll.a +0 -0
  363. data/vendor/local/lib/libiculx.dll.a +0 -0
  364. data/vendor/local/lib/libicutest.dll.a +0 -0
  365. data/vendor/local/lib/libicutu.dll.a +0 -0
  366. data/vendor/local/lib/libicuuc.dll.a +0 -0
  367. data/vendor/local/lib/libpango-1.0.dll.a +0 -0
  368. data/vendor/local/lib/libpango-1.0.la +41 -0
  369. data/vendor/local/lib/libpangocairo-1.0.dll.a +0 -0
  370. data/vendor/local/lib/libpangocairo-1.0.la +41 -0
  371. data/vendor/local/lib/libpangoft2-1.0.dll.a +0 -0
  372. data/vendor/local/lib/libpangoft2-1.0.la +41 -0
  373. data/vendor/local/lib/libpangowin32-1.0.dll.a +0 -0
  374. data/vendor/local/lib/libpangowin32-1.0.la +41 -0
  375. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll +0 -0
  376. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.dll.a +0 -0
  377. data/vendor/local/lib/pango/1.8.0/modules/pango-arabic-lang.la +41 -0
  378. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll +0 -0
  379. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.dll.a +0 -0
  380. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-fc.la +41 -0
  381. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll +0 -0
  382. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.dll.a +0 -0
  383. data/vendor/local/lib/pango/1.8.0/modules/pango-basic-win32.la +41 -0
  384. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll +0 -0
  385. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.dll.a +0 -0
  386. data/vendor/local/lib/pango/1.8.0/modules/pango-indic-lang.la +41 -0
  387. data/vendor/local/lib/pkgconfig/harfbuzz-icu.pc +13 -0
  388. data/vendor/local/lib/pkgconfig/harfbuzz.pc +11 -0
  389. data/vendor/local/lib/pkgconfig/icu-i18n.pc +38 -0
  390. data/vendor/local/lib/pkgconfig/icu-io.pc +38 -0
  391. data/vendor/local/lib/pkgconfig/icu-le.pc +38 -0
  392. data/vendor/local/lib/pkgconfig/icu-lx.pc +38 -0
  393. data/vendor/local/lib/pkgconfig/icu-uc.pc +38 -0
  394. data/vendor/local/lib/pkgconfig/pango.pc +14 -0
  395. data/vendor/local/lib/pkgconfig/pangocairo.pc +11 -0
  396. data/vendor/local/lib/pkgconfig/pangoft2.pc +12 -0
  397. data/vendor/local/lib/pkgconfig/pangowin32.pc +11 -0
  398. data/vendor/local/share/gir-1.0/Pango-1.0.gir +13329 -0
  399. data/vendor/local/share/gir-1.0/PangoCairo-1.0.gir +833 -0
  400. data/vendor/local/share/gir-1.0/PangoFT2-1.0.gir +354 -0
  401. data/vendor/local/share/gtk-doc/html/harfbuzz/annotation-glossary.html +75 -0
  402. data/vendor/local/share/gtk-doc/html/harfbuzz/api-index-full.html +1449 -0
  403. data/vendor/local/share/gtk-doc/html/harfbuzz/ch01.html +98 -0
  404. data/vendor/local/share/gtk-doc/html/harfbuzz/deprecated-api-index.html +46 -0
  405. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-blob.html +610 -0
  406. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-buffer.html +1780 -0
  407. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-common.html +1337 -0
  408. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-coretext.html +144 -0
  409. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-deprecated.html +99 -0
  410. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-face.html +630 -0
  411. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-font.html +2529 -0
  412. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ft.html +188 -0
  413. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-glib.html +120 -0
  414. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-gobject.html +50 -0
  415. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-graphite2.html +120 -0
  416. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-icu.html +120 -0
  417. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-layout.html +771 -0
  418. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-tag.html +172 -0
  419. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot.html +50 -0
  420. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-set.html +966 -0
  421. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape-plan.html +405 -0
  422. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape.html +286 -0
  423. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-unicode.html +1523 -0
  424. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-uniscribe.html +100 -0
  425. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-version.html +182 -0
  426. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb.html +50 -0
  427. data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz.devhelp2 +378 -0
  428. data/vendor/local/share/gtk-doc/html/harfbuzz/home.png +0 -0
  429. data/vendor/local/share/gtk-doc/html/harfbuzz/index.html +105 -0
  430. data/vendor/local/share/gtk-doc/html/harfbuzz/index.sgml +496 -0
  431. data/vendor/local/share/gtk-doc/html/harfbuzz/left-insensitive.png +0 -0
  432. data/vendor/local/share/gtk-doc/html/harfbuzz/left.png +0 -0
  433. data/vendor/local/share/gtk-doc/html/harfbuzz/object-tree.html +59 -0
  434. data/vendor/local/share/gtk-doc/html/harfbuzz/right-insensitive.png +0 -0
  435. data/vendor/local/share/gtk-doc/html/harfbuzz/right.png +0 -0
  436. data/vendor/local/share/gtk-doc/html/harfbuzz/style.css +476 -0
  437. data/vendor/local/share/gtk-doc/html/harfbuzz/up-insensitive.png +0 -0
  438. data/vendor/local/share/gtk-doc/html/harfbuzz/up.png +0 -0
  439. data/vendor/local/share/gtk-doc/html/pango/PangoEngineLang.html +224 -0
  440. data/vendor/local/share/gtk-doc/html/pango/PangoEngineShape.html +255 -0
  441. data/vendor/local/share/gtk-doc/html/pango/PangoFcDecoder.html +246 -0
  442. data/vendor/local/share/gtk-doc/html/pango/PangoFcFont.html +500 -0
  443. data/vendor/local/share/gtk-doc/html/pango/PangoFcFontMap.html +1001 -0
  444. data/vendor/local/share/gtk-doc/html/pango/PangoMarkupFormat.html +301 -0
  445. data/vendor/local/share/gtk-doc/html/pango/PangoRenderer.html +1219 -0
  446. data/vendor/local/share/gtk-doc/html/pango/annotation-glossary.html +89 -0
  447. data/vendor/local/share/gtk-doc/html/pango/api-index-1-10.html +135 -0
  448. data/vendor/local/share/gtk-doc/html/pango/api-index-1-12.html +49 -0
  449. data/vendor/local/share/gtk-doc/html/pango/api-index-1-14.html +64 -0
  450. data/vendor/local/share/gtk-doc/html/pango/api-index-1-16.html +228 -0
  451. data/vendor/local/share/gtk-doc/html/pango/api-index-1-18.html +152 -0
  452. data/vendor/local/share/gtk-doc/html/pango/api-index-1-2.html +122 -0
  453. data/vendor/local/share/gtk-doc/html/pango/api-index-1-20.html +87 -0
  454. data/vendor/local/share/gtk-doc/html/pango/api-index-1-22.html +124 -0
  455. data/vendor/local/share/gtk-doc/html/pango/api-index-1-24.html +97 -0
  456. data/vendor/local/share/gtk-doc/html/pango/api-index-1-26.html +46 -0
  457. data/vendor/local/share/gtk-doc/html/pango/api-index-1-30.html +39 -0
  458. data/vendor/local/share/gtk-doc/html/pango/api-index-1-31-0.html +39 -0
  459. data/vendor/local/share/gtk-doc/html/pango/api-index-1-32-4.html +53 -0
  460. data/vendor/local/share/gtk-doc/html/pango/api-index-1-32.html +42 -0
  461. data/vendor/local/share/gtk-doc/html/pango/api-index-1-34.html +38 -0
  462. data/vendor/local/share/gtk-doc/html/pango/api-index-1-4.html +201 -0
  463. data/vendor/local/share/gtk-doc/html/pango/api-index-1-6.html +165 -0
  464. data/vendor/local/share/gtk-doc/html/pango/api-index-1-8.html +171 -0
  465. data/vendor/local/share/gtk-doc/html/pango/api-index-deprecated.html +284 -0
  466. data/vendor/local/share/gtk-doc/html/pango/api-index-full.html +2968 -0
  467. data/vendor/local/share/gtk-doc/html/pango/home.png +0 -0
  468. data/vendor/local/share/gtk-doc/html/pango/index.html +146 -0
  469. data/vendor/local/share/gtk-doc/html/pango/index.sgml +957 -0
  470. data/vendor/local/share/gtk-doc/html/pango/layout.gif +0 -0
  471. data/vendor/local/share/gtk-doc/html/pango/left-insensitive.png +0 -0
  472. data/vendor/local/share/gtk-doc/html/pango/left.png +0 -0
  473. data/vendor/local/share/gtk-doc/html/pango/lowlevel.html +68 -0
  474. data/vendor/local/share/gtk-doc/html/pango/pango-Bidirectional-Text.html +514 -0
  475. data/vendor/local/share/gtk-doc/html/pango/pango-Cairo-Rendering.html +1632 -0
  476. data/vendor/local/share/gtk-doc/html/pango/pango-CoreText-Fonts.html +115 -0
  477. data/vendor/local/share/gtk-doc/html/pango/pango-Coverage-Maps.html +508 -0
  478. data/vendor/local/share/gtk-doc/html/pango/pango-Engines.html +358 -0
  479. data/vendor/local/share/gtk-doc/html/pango/pango-Fonts.html +4154 -0
  480. data/vendor/local/share/gtk-doc/html/pango/pango-FreeType-Fonts-and-Rendering.html +956 -0
  481. data/vendor/local/share/gtk-doc/html/pango/pango-Glyph-Storage.html +2627 -0
  482. data/vendor/local/share/gtk-doc/html/pango/pango-Layout-Objects.html +4153 -0
  483. data/vendor/local/share/gtk-doc/html/pango/pango-Miscellaneous-Utilities.html +965 -0
  484. data/vendor/local/share/gtk-doc/html/pango/pango-Modules.html +331 -0
  485. data/vendor/local/share/gtk-doc/html/pango/pango-OpenType-Font-Handling.html +2202 -0
  486. data/vendor/local/share/gtk-doc/html/pango/pango-Scripts-and-Languages.html +1430 -0
  487. data/vendor/local/share/gtk-doc/html/pango/pango-Tab-Stops.html +582 -0
  488. data/vendor/local/share/gtk-doc/html/pango/pango-Text-Attributes.html +3356 -0
  489. data/vendor/local/share/gtk-doc/html/pango/pango-Text-Processing.html +2079 -0
  490. data/vendor/local/share/gtk-doc/html/pango/pango-Version-Checking.html +325 -0
  491. data/vendor/local/share/gtk-doc/html/pango/pango-Vertical-Text.html +523 -0
  492. data/vendor/local/share/gtk-doc/html/pango/pango-Win32-Fonts-and-Rendering.html +1028 -0
  493. data/vendor/local/share/gtk-doc/html/pango/pango-Xft-Fonts-and-Rendering.html +1275 -0
  494. data/vendor/local/share/gtk-doc/html/pango/pango-hierarchy.html +91 -0
  495. data/vendor/local/share/gtk-doc/html/pango/pango-querymodules.html +131 -0
  496. data/vendor/local/share/gtk-doc/html/pango/pango.devhelp2 +786 -0
  497. data/vendor/local/share/gtk-doc/html/pango/pango.html +63 -0
  498. data/vendor/local/share/gtk-doc/html/pango/rendering.html +47 -0
  499. data/vendor/local/share/gtk-doc/html/pango/right-insensitive.png +0 -0
  500. data/vendor/local/share/gtk-doc/html/pango/right.png +0 -0
  501. data/vendor/local/share/gtk-doc/html/pango/rotated-text.png +0 -0
  502. data/vendor/local/share/gtk-doc/html/pango/style.css +476 -0
  503. data/vendor/local/share/gtk-doc/html/pango/tools.html +33 -0
  504. data/vendor/local/share/gtk-doc/html/pango/up-insensitive.png +0 -0
  505. data/vendor/local/share/gtk-doc/html/pango/up.png +0 -0
  506. data/vendor/local/share/icu/54.1/config/mh-mingw64 +158 -0
  507. data/vendor/local/share/icu/54.1/install-sh +251 -0
  508. data/vendor/local/share/icu/54.1/license.html +385 -0
  509. data/vendor/local/share/icu/54.1/mkinstalldirs +43 -0
  510. data/vendor/local/share/license/harfbuzz/AUTHORS +9 -0
  511. data/vendor/local/share/license/harfbuzz/COPYING +36 -0
  512. data/vendor/local/share/license/pango/AUTHORS +2 -0
  513. data/vendor/local/share/license/pango/COPYING +482 -0
  514. data/vendor/local/share/man/man1/derb.1 +196 -0
  515. data/vendor/local/share/man/man1/genbrk.1 +112 -0
  516. data/vendor/local/share/man/man1/gencfu.1 +91 -0
  517. data/vendor/local/share/man/man1/gencnval.1 +91 -0
  518. data/vendor/local/share/man/man1/gendict.1 +131 -0
  519. data/vendor/local/share/man/man1/genrb.1 +146 -0
  520. data/vendor/local/share/man/man1/icu-config.1 +288 -0
  521. data/vendor/local/share/man/man1/makeconv.1 +112 -0
  522. data/vendor/local/share/man/man1/pango-querymodules.1 +106 -0
  523. data/vendor/local/share/man/man1/pango-view.1 +1 -0
  524. data/vendor/local/share/man/man1/pkgdata.1 +258 -0
  525. data/vendor/local/share/man/man1/uconv.1 +443 -0
  526. data/vendor/local/share/man/man8/genccode.8 +106 -0
  527. data/vendor/local/share/man/man8/gencmn.8 +129 -0
  528. data/vendor/local/share/man/man8/gensprep.8 +102 -0
  529. data/vendor/local/share/man/man8/icupkg.8 +204 -0
  530. metadata +599 -0
@@ -0,0 +1,1064 @@
1
+ /*
2
+ ***************************************************************************
3
+ * Copyright (C) 2008-2014, International Business Machines Corporation
4
+ * and others. All Rights Reserved.
5
+ ***************************************************************************
6
+ * file name: uspoof.h
7
+ * encoding: US-ASCII
8
+ * tab size: 8 (not used)
9
+ * indentation:4
10
+ *
11
+ * created on: 2008Feb13
12
+ * created by: Andy Heninger
13
+ *
14
+ * Unicode Spoof Detection
15
+ */
16
+
17
+ #ifndef USPOOF_H
18
+ #define USPOOF_H
19
+
20
+ #include "unicode/utypes.h"
21
+ #include "unicode/uset.h"
22
+ #include "unicode/parseerr.h"
23
+ #include "unicode/localpointer.h"
24
+
25
+ #if !UCONFIG_NO_NORMALIZATION
26
+
27
+
28
+ #if U_SHOW_CPLUSPLUS_API
29
+ #include "unicode/unistr.h"
30
+ #include "unicode/uniset.h"
31
+ #endif
32
+
33
+
34
+ /**
35
+ * \file
36
+ * \brief Unicode Security and Spoofing Detection, C API.
37
+ *
38
+ * These functions are intended to check strings, typically
39
+ * identifiers of some type, such as URLs, for the presence of
40
+ * characters that are likely to be visually confusing -
41
+ * for cases where the displayed form of an identifier may
42
+ * not be what it appears to be.
43
+ *
44
+ * Unicode Technical Report #36, http://unicode.org/reports/tr36, and
45
+ * Unicode Technical Standard #39, http://unicode.org/reports/tr39
46
+ * "Unicode security considerations", give more background on
47
+ * security an spoofing issues with Unicode identifiers.
48
+ * The tests and checks provided by this module implement the recommendations
49
+ * from those Unicode documents.
50
+ *
51
+ * The tests available on identifiers fall into two general categories:
52
+ * -# Single identifier tests. Check whether an identifier is
53
+ * potentially confusable with any other string, or is suspicious
54
+ * for other reasons.
55
+ * -# Two identifier tests. Check whether two specific identifiers are confusable.
56
+ * This does not consider whether either of strings is potentially
57
+ * confusable with any string other than the exact one specified.
58
+ *
59
+ * The steps to perform confusability testing are
60
+ * -# Open a USpoofChecker.
61
+ * -# Configure the USPoofChecker for the desired set of tests. The tests that will
62
+ * be performed are specified by a set of USpoofChecks flags.
63
+ * -# Perform the checks using the pre-configured USpoofChecker. The results indicate
64
+ * which (if any) of the selected tests have identified possible problems with the identifier.
65
+ * Results are reported as a set of USpoofChecks flags; this mirrors the form in which
66
+ * the set of tests to perform was originally specified to the USpoofChecker.
67
+ *
68
+ * A USpoofChecker may be used repeatedly to perform checks on any number of identifiers.
69
+ *
70
+ * Thread Safety: The test functions for checking a single identifier, or for testing
71
+ * whether two identifiers are possible confusable, are thread safe.
72
+ * They may called concurrently, from multiple threads, using the same USpoofChecker instance.
73
+ *
74
+ * More generally, the standard ICU thread safety rules apply: functions that take a
75
+ * const USpoofChecker parameter are thread safe. Those that take a non-const
76
+ * USpoofChecier are not thread safe.
77
+ *
78
+ *
79
+ * Descriptions of the available checks.
80
+ *
81
+ * When testing whether pairs of identifiers are confusable, with the uspoof_areConfusable()
82
+ * family of functions, the relevant tests are
83
+ *
84
+ * -# USPOOF_SINGLE_SCRIPT_CONFUSABLE: All of the characters from the two identifiers are
85
+ * from a single script, and the two identifiers are visually confusable.
86
+ * -# USPOOF_MIXED_SCRIPT_CONFUSABLE: At least one of the identifiers contains characters
87
+ * from more than one script, and the two identifiers are visually confusable.
88
+ * -# USPOOF_WHOLE_SCRIPT_CONFUSABLE: Each of the two identifiers is of a single script, but
89
+ * the two identifiers are from different scripts, and they are visually confusable.
90
+ *
91
+ * The safest approach is to enable all three of these checks as a group.
92
+ *
93
+ * USPOOF_ANY_CASE is a modifier for the above tests. If the identifiers being checked can
94
+ * be of mixed case and are used in a case-sensitive manner, this option should be specified.
95
+ *
96
+ * If the identifiers being checked are used in a case-insensitive manner, and if they are
97
+ * displayed to users in lower-case form only, the USPOOF_ANY_CASE option should not be
98
+ * specified. Confusabality issues involving upper case letters will not be reported.
99
+ *
100
+ * When performing tests on a single identifier, with the uspoof_check() family of functions,
101
+ * the relevant tests are:
102
+ *
103
+ * -# USPOOF_MIXED_SCRIPT_CONFUSABLE: the identifier contains characters from multiple
104
+ * scripts, and there exists an identifier of a single script that is visually confusable.
105
+ * -# USPOOF_WHOLE_SCRIPT_CONFUSABLE: the identifier consists of characters from a single
106
+ * script, and there exists a visually confusable identifier.
107
+ * The visually confusable identifier also consists of characters from a single script.
108
+ * but not the same script as the identifier being checked.
109
+ * -# USPOOF_ANY_CASE: modifies the mixed script and whole script confusables tests. If
110
+ * specified, the checks will consider confusable characters of any case. If this flag is not
111
+ * set, the test is performed assuming case folded identifiers.
112
+ * -# USPOOF_SINGLE_SCRIPT: check that the identifier contains only characters from a
113
+ * single script. (Characters from the 'common' and 'inherited' scripts are ignored.)
114
+ * This is not a test for confusable identifiers
115
+ * -# USPOOF_INVISIBLE: check an identifier for the presence of invisible characters,
116
+ * such as zero-width spaces, or character sequences that are
117
+ * likely not to display, such as multiple occurrences of the same
118
+ * non-spacing mark. This check does not test the input string as a whole
119
+ * for conformance to any particular syntax for identifiers.
120
+ * -# USPOOF_CHAR_LIMIT: check that an identifier contains only characters from a specified set
121
+ * of acceptable characters. See uspoof_setAllowedChars() and
122
+ * uspoof_setAllowedLocales().
123
+ *
124
+ * Note on Scripts:
125
+ * Characters from the Unicode Scripts "Common" and "Inherited" are ignored when considering
126
+ * the script of an identifier. Common characters include digits and symbols that
127
+ * are normally used with text from more than one script.
128
+ *
129
+ * Identifier Skeletons: A skeleton is a transformation of an identifier, such that
130
+ * all identifiers that are confusable with each other have the same skeleton.
131
+ * Using skeletons, it is possible to build a dictionary data structure for
132
+ * a set of identifiers, and then quickly test whether a new identifier is
133
+ * confusable with an identifier already in the set. The uspoof_getSkeleton()
134
+ * family of functions will produce the skeleton from an identifier.
135
+ *
136
+ * Note that skeletons are not guaranteed to be stable between versions
137
+ * of Unicode or ICU, so an applications should not rely on creating a permanent,
138
+ * or difficult to update, database of skeletons. Instabilities result from
139
+ * identifying new pairs or sequences of characters that are visually
140
+ * confusable, and thus must be mapped to the same skeleton character(s).
141
+ *
142
+ */
143
+
144
+ struct USpoofChecker;
145
+ typedef struct USpoofChecker USpoofChecker; /**< typedef for C of USpoofChecker */
146
+
147
+ /**
148
+ * Enum for the kinds of checks that USpoofChecker can perform.
149
+ * These enum values are used both to select the set of checks that
150
+ * will be performed, and to report results from the check function.
151
+ *
152
+ * @stable ICU 4.2
153
+ */
154
+ typedef enum USpoofChecks {
155
+ /** Single script confusable test.
156
+ * When testing whether two identifiers are confusable, report that they are if
157
+ * both are from the same script and they are visually confusable.
158
+ * Note: this test is not applicable to a check of a single identifier.
159
+ */
160
+ USPOOF_SINGLE_SCRIPT_CONFUSABLE = 1,
161
+
162
+ /** Mixed script confusable test.
163
+ * When checking a single identifier, report a problem if
164
+ * the identifier contains multiple scripts, and
165
+ * is confusable with some other identifier in a single script
166
+ * When testing whether two identifiers are confusable, report that they are if
167
+ * the two IDs are visually confusable,
168
+ * and at least one contains characters from more than one script.
169
+ */
170
+ USPOOF_MIXED_SCRIPT_CONFUSABLE = 2,
171
+
172
+ /** Whole script confusable test.
173
+ * When checking a single identifier, report a problem if
174
+ * The identifier is of a single script, and
175
+ * there exists a confusable identifier in another script.
176
+ * When testing whether two identifiers are confusable, report that they are if
177
+ * each is of a single script,
178
+ * the scripts of the two identifiers are different, and
179
+ * the identifiers are visually confusable.
180
+ */
181
+ USPOOF_WHOLE_SCRIPT_CONFUSABLE = 4,
182
+
183
+ /** Any Case Modifier for confusable identifier tests.
184
+ If specified, consider all characters, of any case, when looking for confusables.
185
+ If USPOOF_ANY_CASE is not specified, identifiers being checked are assumed to have been
186
+ case folded. Upper case confusable characters will not be checked.
187
+ Selects between Lower Case Confusable and
188
+ Any Case Confusable. */
189
+ USPOOF_ANY_CASE = 8,
190
+
191
+ /**
192
+ * Check that an identifier is no looser than the specified RestrictionLevel.
193
+ * The default if uspoof_setRestrctionLevel() is not called is HIGHLY_RESTRICTIVE.
194
+ *
195
+ * If USPOOF_AUX_INFO is enabled the actual restriction level of the
196
+ * identifier being tested will also be returned by uspoof_check().
197
+ *
198
+ * @see URestrictionLevel
199
+ * @see uspoof_setRestrictionLevel
200
+ * @see USPOOF_AUX_INFO
201
+ *
202
+ * @stable ICU 51
203
+ */
204
+ USPOOF_RESTRICTION_LEVEL = 16,
205
+
206
+ #ifndef U_HIDE_DEPRECATED_API
207
+ /** Check that an identifier contains only characters from a
208
+ * single script (plus chars from the common and inherited scripts.)
209
+ * Applies to checks of a single identifier check only.
210
+ * @deprecated ICU 51 Use RESTRICTION_LEVEL instead.
211
+ */
212
+ USPOOF_SINGLE_SCRIPT = USPOOF_RESTRICTION_LEVEL,
213
+ #endif /* U_HIDE_DEPRECATED_API */
214
+
215
+ /** Check an identifier for the presence of invisible characters,
216
+ * such as zero-width spaces, or character sequences that are
217
+ * likely not to display, such as multiple occurrences of the same
218
+ * non-spacing mark. This check does not test the input string as a whole
219
+ * for conformance to any particular syntax for identifiers.
220
+ */
221
+ USPOOF_INVISIBLE = 32,
222
+
223
+ /** Check that an identifier contains only characters from a specified set
224
+ * of acceptable characters. See uspoof_setAllowedChars() and
225
+ * uspoof_setAllowedLocales().
226
+ */
227
+ USPOOF_CHAR_LIMIT = 64,
228
+
229
+ /**
230
+ * Check that an identifier does not include decimal digits from
231
+ * more than one numbering system.
232
+ *
233
+ * @stable ICU 51
234
+ */
235
+ USPOOF_MIXED_NUMBERS = 128,
236
+
237
+ /**
238
+ * Enable all spoof checks.
239
+ *
240
+ * @stable ICU 4.6
241
+ */
242
+ USPOOF_ALL_CHECKS = 0xFFFF,
243
+
244
+ /**
245
+ * Enable the return of auxillary (non-error) information in the
246
+ * upper bits of the check results value.
247
+ *
248
+ * If this "check" is not enabled, the results of uspoof_check() will be zero when an
249
+ * identifier passes all of the enabled checks.
250
+ *
251
+ * If this "check" is enabled, (uspoof_check() & USPOOF_ALL_CHECKS) will be zero
252
+ * when an identifier passes all checks.
253
+ *
254
+ * @stable ICU 51
255
+ */
256
+ USPOOF_AUX_INFO = 0x40000000
257
+
258
+ } USpoofChecks;
259
+
260
+
261
+ /**
262
+ * Constants from UAX #39 for use in setRestrictionLevel(), and
263
+ * for returned identifier restriction levels in check results.
264
+ * @stable ICU 51
265
+ */
266
+ typedef enum URestrictionLevel {
267
+ /**
268
+ * Only ASCII characters: U+0000..U+007F
269
+ *
270
+ * @stable ICU 51
271
+ */
272
+ USPOOF_ASCII = 0x10000000,
273
+ #ifndef U_HIDE_DRAFT_API
274
+ /**
275
+ * All characters in each identifier must be from a single script.
276
+ *
277
+ * @draft ICU 53
278
+ */
279
+ USPOOF_SINGLE_SCRIPT_RESTRICTIVE = 0x20000000,
280
+ #endif /* U_HIDE_DRAFT_API */
281
+ /**
282
+ * All characters in each identifier must be from a single script, or from the combinations: Latin + Han +
283
+ * Hiragana + Katakana; Latin + Han + Bopomofo; or Latin + Han + Hangul. Note that this level will satisfy the
284
+ * vast majority of Latin-script users; also that TR36 has ASCII instead of Latin.
285
+ *
286
+ * @stable ICU 51
287
+ */
288
+ USPOOF_HIGHLY_RESTRICTIVE = 0x30000000,
289
+ /**
290
+ * Allow Latin with other scripts except Cyrillic, Greek, Cherokee Otherwise, the same as Highly Restrictive
291
+ *
292
+ * @stable ICU 51
293
+ */
294
+ USPOOF_MODERATELY_RESTRICTIVE = 0x40000000,
295
+ /**
296
+ * Allow arbitrary mixtures of scripts. Otherwise, the same as Moderately Restrictive.
297
+ *
298
+ * @stable ICU 51
299
+ */
300
+ USPOOF_MINIMALLY_RESTRICTIVE = 0x50000000,
301
+ /**
302
+ * Any valid identifiers, including characters outside of the Identifier Profile.
303
+ *
304
+ * @stable ICU 51
305
+ */
306
+ USPOOF_UNRESTRICTIVE = 0x60000000,
307
+ #ifndef U_HIDE_DRAFT_API
308
+ /**
309
+ * Mask for selecting the Restriction Level bits from the return value of uspoof_check().
310
+ *
311
+ * @draft ICU 53
312
+ */
313
+ USPOOF_RESTRICTION_LEVEL_MASK = 0x7F000000
314
+ #endif /* U_HIDE_DRAFT_API */
315
+ } URestrictionLevel;
316
+
317
+ /**
318
+ * Create a Unicode Spoof Checker, configured to perform all
319
+ * checks except for USPOOF_LOCALE_LIMIT and USPOOF_CHAR_LIMIT.
320
+ * Note that additional checks may be added in the future,
321
+ * resulting in the changes to the default checking behavior.
322
+ *
323
+ * @param status The error code, set if this function encounters a problem.
324
+ * @return the newly created Spoof Checker
325
+ * @stable ICU 4.2
326
+ */
327
+ U_STABLE USpoofChecker * U_EXPORT2
328
+ uspoof_open(UErrorCode *status);
329
+
330
+
331
+ /**
332
+ * Open a Spoof checker from its serialized form, stored in 32-bit-aligned memory.
333
+ * Inverse of uspoof_serialize().
334
+ * The memory containing the serialized data must remain valid and unchanged
335
+ * as long as the spoof checker, or any cloned copies of the spoof checker,
336
+ * are in use. Ownership of the memory remains with the caller.
337
+ * The spoof checker (and any clones) must be closed prior to deleting the
338
+ * serialized data.
339
+ *
340
+ * @param data a pointer to 32-bit-aligned memory containing the serialized form of spoof data
341
+ * @param length the number of bytes available at data;
342
+ * can be more than necessary
343
+ * @param pActualLength receives the actual number of bytes at data taken up by the data;
344
+ * can be NULL
345
+ * @param pErrorCode ICU error code
346
+ * @return the spoof checker.
347
+ *
348
+ * @see uspoof_open
349
+ * @see uspoof_serialize
350
+ * @stable ICU 4.2
351
+ */
352
+ U_STABLE USpoofChecker * U_EXPORT2
353
+ uspoof_openFromSerialized(const void *data, int32_t length, int32_t *pActualLength,
354
+ UErrorCode *pErrorCode);
355
+
356
+ /**
357
+ * Open a Spoof Checker from the source form of the spoof data.
358
+ * The two inputs correspond to the Unicode data files confusables.txt
359
+ * and confusablesWholeScript.txt as described in Unicode UAX #39.
360
+ * The syntax of the source data is as described in UAX #39 for
361
+ * these files, and the content of these files is acceptable input.
362
+ *
363
+ * The character encoding of the (char *) input text is UTF-8.
364
+ *
365
+ * @param confusables a pointer to the confusable characters definitions,
366
+ * as found in file confusables.txt from unicode.org.
367
+ * @param confusablesLen The length of the confusables text, or -1 if the
368
+ * input string is zero terminated.
369
+ * @param confusablesWholeScript
370
+ * a pointer to the whole script confusables definitions,
371
+ * as found in the file confusablesWholeScript.txt from unicode.org.
372
+ * @param confusablesWholeScriptLen The length of the whole script confusables text, or
373
+ * -1 if the input string is zero terminated.
374
+ * @param errType In the event of an error in the input, indicates
375
+ * which of the input files contains the error.
376
+ * The value is one of USPOOF_SINGLE_SCRIPT_CONFUSABLE or
377
+ * USPOOF_WHOLE_SCRIPT_CONFUSABLE, or
378
+ * zero if no errors are found.
379
+ * @param pe In the event of an error in the input, receives the position
380
+ * in the input text (line, offset) of the error.
381
+ * @param status an in/out ICU UErrorCode. Among the possible errors is
382
+ * U_PARSE_ERROR, which is used to report syntax errors
383
+ * in the input.
384
+ * @return A spoof checker that uses the rules from the input files.
385
+ * @stable ICU 4.2
386
+ */
387
+ U_STABLE USpoofChecker * U_EXPORT2
388
+ uspoof_openFromSource(const char *confusables, int32_t confusablesLen,
389
+ const char *confusablesWholeScript, int32_t confusablesWholeScriptLen,
390
+ int32_t *errType, UParseError *pe, UErrorCode *status);
391
+
392
+
393
+ /**
394
+ * Close a Spoof Checker, freeing any memory that was being held by
395
+ * its implementation.
396
+ * @stable ICU 4.2
397
+ */
398
+ U_STABLE void U_EXPORT2
399
+ uspoof_close(USpoofChecker *sc);
400
+
401
+ #if U_SHOW_CPLUSPLUS_API
402
+
403
+ U_NAMESPACE_BEGIN
404
+
405
+ /**
406
+ * \class LocalUSpoofCheckerPointer
407
+ * "Smart pointer" class, closes a USpoofChecker via uspoof_close().
408
+ * For most methods see the LocalPointerBase base class.
409
+ *
410
+ * @see LocalPointerBase
411
+ * @see LocalPointer
412
+ * @stable ICU 4.4
413
+ */
414
+ U_DEFINE_LOCAL_OPEN_POINTER(LocalUSpoofCheckerPointer, USpoofChecker, uspoof_close);
415
+
416
+ U_NAMESPACE_END
417
+
418
+ #endif
419
+
420
+ /**
421
+ * Clone a Spoof Checker. The clone will be set to perform the same checks
422
+ * as the original source.
423
+ *
424
+ * @param sc The source USpoofChecker
425
+ * @param status The error code, set if this function encounters a problem.
426
+ * @return
427
+ * @stable ICU 4.2
428
+ */
429
+ U_STABLE USpoofChecker * U_EXPORT2
430
+ uspoof_clone(const USpoofChecker *sc, UErrorCode *status);
431
+
432
+
433
+ /**
434
+ * Specify the set of checks that will be performed by the check
435
+ * functions of this Spoof Checker.
436
+ *
437
+ * @param sc The USpoofChecker
438
+ * @param checks The set of checks that this spoof checker will perform.
439
+ * The value is a bit set, obtained by OR-ing together
440
+ * values from enum USpoofChecks.
441
+ * @param status The error code, set if this function encounters a problem.
442
+ * @stable ICU 4.2
443
+ *
444
+ */
445
+ U_STABLE void U_EXPORT2
446
+ uspoof_setChecks(USpoofChecker *sc, int32_t checks, UErrorCode *status);
447
+
448
+ /**
449
+ * Get the set of checks that this Spoof Checker has been configured to perform.
450
+ *
451
+ * @param sc The USpoofChecker
452
+ * @param status The error code, set if this function encounters a problem.
453
+ * @return The set of checks that this spoof checker will perform.
454
+ * The value is a bit set, obtained by OR-ing together
455
+ * values from enum USpoofChecks.
456
+ * @stable ICU 4.2
457
+ *
458
+ */
459
+ U_STABLE int32_t U_EXPORT2
460
+ uspoof_getChecks(const USpoofChecker *sc, UErrorCode *status);
461
+
462
+ /**
463
+ * Set the loosest restriction level allowed. The default if this function
464
+ * is not called is HIGHLY_RESTRICTIVE.
465
+ * Calling this function also enables the RESTRICTION_LEVEL check.
466
+ * @param restrictionLevel The loosest restriction level allowed.
467
+ * @see URestrictionLevel
468
+ * @stable ICU 51
469
+ */
470
+ U_STABLE void U_EXPORT2
471
+ uspoof_setRestrictionLevel(USpoofChecker *sc, URestrictionLevel restrictionLevel);
472
+
473
+
474
+ /**
475
+ * Get the Restriction Level that will be tested if the checks include RESTRICTION_LEVEL.
476
+ *
477
+ * @return The restriction level
478
+ * @see URestrictionLevel
479
+ * @stable ICU 51
480
+ */
481
+ U_STABLE URestrictionLevel U_EXPORT2
482
+ uspoof_getRestrictionLevel(const USpoofChecker *sc);
483
+
484
+ /**
485
+ * Limit characters that are acceptable in identifiers being checked to those
486
+ * normally used with the languages associated with the specified locales.
487
+ * Any previously specified list of locales is replaced by the new settings.
488
+ *
489
+ * A set of languages is determined from the locale(s), and
490
+ * from those a set of acceptable Unicode scripts is determined.
491
+ * Characters from this set of scripts, along with characters from
492
+ * the "common" and "inherited" Unicode Script categories
493
+ * will be permitted.
494
+ *
495
+ * Supplying an empty string removes all restrictions;
496
+ * characters from any script will be allowed.
497
+ *
498
+ * The USPOOF_CHAR_LIMIT test is automatically enabled for this
499
+ * USpoofChecker when calling this function with a non-empty list
500
+ * of locales.
501
+ *
502
+ * The Unicode Set of characters that will be allowed is accessible
503
+ * via the uspoof_getAllowedChars() function. uspoof_setAllowedLocales()
504
+ * will <i>replace</i> any previously applied set of allowed characters.
505
+ *
506
+ * Adjustments, such as additions or deletions of certain classes of characters,
507
+ * can be made to the result of uspoof_setAllowedLocales() by
508
+ * fetching the resulting set with uspoof_getAllowedChars(),
509
+ * manipulating it with the Unicode Set API, then resetting the
510
+ * spoof detectors limits with uspoof_setAllowedChars()
511
+ *
512
+ * @param sc The USpoofChecker
513
+ * @param localesList A list list of locales, from which the language
514
+ * and associated script are extracted. The locales
515
+ * are comma-separated if there is more than one.
516
+ * White space may not appear within an individual locale,
517
+ * but is ignored otherwise.
518
+ * The locales are syntactically like those from the
519
+ * HTTP Accept-Language header.
520
+ * If the localesList is empty, no restrictions will be placed on
521
+ * the allowed characters.
522
+ *
523
+ * @param status The error code, set if this function encounters a problem.
524
+ * @stable ICU 4.2
525
+ */
526
+ U_STABLE void U_EXPORT2
527
+ uspoof_setAllowedLocales(USpoofChecker *sc, const char *localesList, UErrorCode *status);
528
+
529
+ /**
530
+ * Get a list of locales for the scripts that are acceptable in strings
531
+ * to be checked. If no limitations on scripts have been specified,
532
+ * an empty string will be returned.
533
+ *
534
+ * uspoof_setAllowedChars() will reset the list of allowed to be empty.
535
+ *
536
+ * The format of the returned list is the same as that supplied to
537
+ * uspoof_setAllowedLocales(), but returned list may not be identical
538
+ * to the originally specified string; the string may be reformatted,
539
+ * and information other than languages from
540
+ * the originally specified locales may be omitted.
541
+ *
542
+ * @param sc The USpoofChecker
543
+ * @param status The error code, set if this function encounters a problem.
544
+ * @return A string containing a list of locales corresponding
545
+ * to the acceptable scripts, formatted like an
546
+ * HTTP Accept Language value.
547
+ *
548
+ * @stable ICU 4.2
549
+ */
550
+ U_STABLE const char * U_EXPORT2
551
+ uspoof_getAllowedLocales(USpoofChecker *sc, UErrorCode *status);
552
+
553
+
554
+ /**
555
+ * Limit the acceptable characters to those specified by a Unicode Set.
556
+ * Any previously specified character limit is
557
+ * is replaced by the new settings. This includes limits on
558
+ * characters that were set with the uspoof_setAllowedLocales() function.
559
+ *
560
+ * The USPOOF_CHAR_LIMIT test is automatically enabled for this
561
+ * USpoofChecker by this function.
562
+ *
563
+ * @param sc The USpoofChecker
564
+ * @param chars A Unicode Set containing the list of
565
+ * characters that are permitted. Ownership of the set
566
+ * remains with the caller. The incoming set is cloned by
567
+ * this function, so there are no restrictions on modifying
568
+ * or deleting the USet after calling this function.
569
+ * @param status The error code, set if this function encounters a problem.
570
+ * @stable ICU 4.2
571
+ */
572
+ U_STABLE void U_EXPORT2
573
+ uspoof_setAllowedChars(USpoofChecker *sc, const USet *chars, UErrorCode *status);
574
+
575
+
576
+ /**
577
+ * Get a USet for the characters permitted in an identifier.
578
+ * This corresponds to the limits imposed by the Set Allowed Characters
579
+ * functions. Limitations imposed by other checks will not be
580
+ * reflected in the set returned by this function.
581
+ *
582
+ * The returned set will be frozen, meaning that it cannot be modified
583
+ * by the caller.
584
+ *
585
+ * Ownership of the returned set remains with the Spoof Detector. The
586
+ * returned set will become invalid if the spoof detector is closed,
587
+ * or if a new set of allowed characters is specified.
588
+ *
589
+ *
590
+ * @param sc The USpoofChecker
591
+ * @param status The error code, set if this function encounters a problem.
592
+ * @return A USet containing the characters that are permitted by
593
+ * the USPOOF_CHAR_LIMIT test.
594
+ * @stable ICU 4.2
595
+ */
596
+ U_STABLE const USet * U_EXPORT2
597
+ uspoof_getAllowedChars(const USpoofChecker *sc, UErrorCode *status);
598
+
599
+
600
+ #if U_SHOW_CPLUSPLUS_API
601
+ /**
602
+ * Limit the acceptable characters to those specified by a Unicode Set.
603
+ * Any previously specified character limit is
604
+ * is replaced by the new settings. This includes limits on
605
+ * characters that were set with the uspoof_setAllowedLocales() function.
606
+ *
607
+ * The USPOOF_CHAR_LIMIT test is automatically enabled for this
608
+ * USoofChecker by this function.
609
+ *
610
+ * @param sc The USpoofChecker
611
+ * @param chars A Unicode Set containing the list of
612
+ * characters that are permitted. Ownership of the set
613
+ * remains with the caller. The incoming set is cloned by
614
+ * this function, so there are no restrictions on modifying
615
+ * or deleting the UnicodeSet after calling this function.
616
+ * @param status The error code, set if this function encounters a problem.
617
+ * @stable ICU 4.2
618
+ */
619
+ U_STABLE void U_EXPORT2
620
+ uspoof_setAllowedUnicodeSet(USpoofChecker *sc, const icu::UnicodeSet *chars, UErrorCode *status);
621
+
622
+
623
+ /**
624
+ * Get a UnicodeSet for the characters permitted in an identifier.
625
+ * This corresponds to the limits imposed by the Set Allowed Characters /
626
+ * UnicodeSet functions. Limitations imposed by other checks will not be
627
+ * reflected in the set returned by this function.
628
+ *
629
+ * The returned set will be frozen, meaning that it cannot be modified
630
+ * by the caller.
631
+ *
632
+ * Ownership of the returned set remains with the Spoof Detector. The
633
+ * returned set will become invalid if the spoof detector is closed,
634
+ * or if a new set of allowed characters is specified.
635
+ *
636
+ *
637
+ * @param sc The USpoofChecker
638
+ * @param status The error code, set if this function encounters a problem.
639
+ * @return A UnicodeSet containing the characters that are permitted by
640
+ * the USPOOF_CHAR_LIMIT test.
641
+ * @stable ICU 4.2
642
+ */
643
+ U_STABLE const icu::UnicodeSet * U_EXPORT2
644
+ uspoof_getAllowedUnicodeSet(const USpoofChecker *sc, UErrorCode *status);
645
+ #endif
646
+
647
+
648
+ /**
649
+ * Check the specified string for possible security issues.
650
+ * The text to be checked will typically be an identifier of some sort.
651
+ * The set of checks to be performed is specified with uspoof_setChecks().
652
+ *
653
+ * @param sc The USpoofChecker
654
+ * @param id The identifier to be checked for possible security issues,
655
+ * in UTF-16 format.
656
+ * @param length the length of the string to be checked, expressed in
657
+ * 16 bit UTF-16 code units, or -1 if the string is
658
+ * zero terminated.
659
+ * @param position An out parameter.
660
+ * Originally, the index of the first string position that failed a check.
661
+ * Now, always returns zero.
662
+ * This parameter may be null.
663
+ * @param status The error code, set if an error occurred while attempting to
664
+ * perform the check.
665
+ * Spoofing or security issues detected with the input string are
666
+ * not reported here, but through the function's return value.
667
+ * @return An integer value with bits set for any potential security
668
+ * or spoofing issues detected. The bits are defined by
669
+ * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS)
670
+ * will be zero if the input string passes all of the
671
+ * enabled checks.
672
+ * @stable ICU 4.2
673
+ */
674
+ U_STABLE int32_t U_EXPORT2
675
+ uspoof_check(const USpoofChecker *sc,
676
+ const UChar *id, int32_t length,
677
+ int32_t *position,
678
+ UErrorCode *status);
679
+
680
+
681
+ /**
682
+ * Check the specified string for possible security issues.
683
+ * The text to be checked will typically be an identifier of some sort.
684
+ * The set of checks to be performed is specified with uspoof_setChecks().
685
+ *
686
+ * @param sc The USpoofChecker
687
+ * @param id A identifier to be checked for possible security issues, in UTF8 format.
688
+ * @param length the length of the string to be checked, or -1 if the string is
689
+ * zero terminated.
690
+ * @param position An out parameter.
691
+ * Originally, the index of the first string position that failed a check.
692
+ * Now, always returns zero.
693
+ * This parameter may be null.
694
+ * @deprecated ICU 51
695
+ * @param status The error code, set if an error occurred while attempting to
696
+ * perform the check.
697
+ * Spoofing or security issues detected with the input string are
698
+ * not reported here, but through the function's return value.
699
+ * If the input contains invalid UTF-8 sequences,
700
+ * a status of U_INVALID_CHAR_FOUND will be returned.
701
+ * @return An integer value with bits set for any potential security
702
+ * or spoofing issues detected. The bits are defined by
703
+ * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS)
704
+ * will be zero if the input string passes all of the
705
+ * enabled checks.
706
+ * @stable ICU 4.2
707
+ */
708
+ U_STABLE int32_t U_EXPORT2
709
+ uspoof_checkUTF8(const USpoofChecker *sc,
710
+ const char *id, int32_t length,
711
+ int32_t *position,
712
+ UErrorCode *status);
713
+
714
+
715
+ #if U_SHOW_CPLUSPLUS_API
716
+ /**
717
+ * Check the specified string for possible security issues.
718
+ * The text to be checked will typically be an identifier of some sort.
719
+ * The set of checks to be performed is specified with uspoof_setChecks().
720
+ *
721
+ * @param sc The USpoofChecker
722
+ * @param id A identifier to be checked for possible security issues.
723
+ * @param position An out parameter.
724
+ * Originally, the index of the first string position that failed a check.
725
+ * Now, always returns zero.
726
+ * This parameter may be null.
727
+ * @deprecated ICU 51
728
+ * @param status The error code, set if an error occurred while attempting to
729
+ * perform the check.
730
+ * Spoofing or security issues detected with the input string are
731
+ * not reported here, but through the function's return value.
732
+ * @return An integer value with bits set for any potential security
733
+ * or spoofing issues detected. The bits are defined by
734
+ * enum USpoofChecks. (returned_value & USPOOF_ALL_CHECKS)
735
+ * will be zero if the input string passes all of the
736
+ * enabled checks.
737
+ * @stable ICU 4.2
738
+ */
739
+ U_STABLE int32_t U_EXPORT2
740
+ uspoof_checkUnicodeString(const USpoofChecker *sc,
741
+ const icu::UnicodeString &id,
742
+ int32_t *position,
743
+ UErrorCode *status);
744
+
745
+ #endif
746
+
747
+
748
+ /**
749
+ * Check the whether two specified strings are visually confusable.
750
+ * The types of confusability to be tested - single script, mixed script,
751
+ * or whole script - are determined by the check options set for the
752
+ * USpoofChecker.
753
+ *
754
+ * The tests to be performed are controlled by the flags
755
+ * USPOOF_SINGLE_SCRIPT_CONFUSABLE
756
+ * USPOOF_MIXED_SCRIPT_CONFUSABLE
757
+ * USPOOF_WHOLE_SCRIPT_CONFUSABLE
758
+ * At least one of these tests must be selected.
759
+ *
760
+ * USPOOF_ANY_CASE is a modifier for the tests. Select it if the identifiers
761
+ * may be of mixed case.
762
+ * If identifiers are case folded for comparison and
763
+ * display to the user, do not select the USPOOF_ANY_CASE option.
764
+ *
765
+ *
766
+ * @param sc The USpoofChecker
767
+ * @param id1 The first of the two identifiers to be compared for
768
+ * confusability. The strings are in UTF-16 format.
769
+ * @param length1 the length of the first identifer, expressed in
770
+ * 16 bit UTF-16 code units, or -1 if the string is
771
+ * nul terminated.
772
+ * @param id2 The second of the two identifiers to be compared for
773
+ * confusability. The identifiers are in UTF-16 format.
774
+ * @param length2 The length of the second identifiers, expressed in
775
+ * 16 bit UTF-16 code units, or -1 if the string is
776
+ * nul terminated.
777
+ * @param status The error code, set if an error occurred while attempting to
778
+ * perform the check.
779
+ * Confusability of the identifiers is not reported here,
780
+ * but through this function's return value.
781
+ * @return An integer value with bit(s) set corresponding to
782
+ * the type of confusability found, as defined by
783
+ * enum USpoofChecks. Zero is returned if the identifiers
784
+ * are not confusable.
785
+ * @stable ICU 4.2
786
+ */
787
+ U_STABLE int32_t U_EXPORT2
788
+ uspoof_areConfusable(const USpoofChecker *sc,
789
+ const UChar *id1, int32_t length1,
790
+ const UChar *id2, int32_t length2,
791
+ UErrorCode *status);
792
+
793
+
794
+
795
+ /**
796
+ * Check the whether two specified strings are visually confusable.
797
+ * The types of confusability to be tested - single script, mixed script,
798
+ * or whole script - are determined by the check options set for the
799
+ * USpoofChecker.
800
+ *
801
+ * @param sc The USpoofChecker
802
+ * @param id1 The first of the two identifiers to be compared for
803
+ * confusability. The strings are in UTF-8 format.
804
+ * @param length1 the length of the first identifiers, in bytes, or -1
805
+ * if the string is nul terminated.
806
+ * @param id2 The second of the two identifiers to be compared for
807
+ * confusability. The strings are in UTF-8 format.
808
+ * @param length2 The length of the second string in bytes, or -1
809
+ * if the string is nul terminated.
810
+ * @param status The error code, set if an error occurred while attempting to
811
+ * perform the check.
812
+ * Confusability of the strings is not reported here,
813
+ * but through this function's return value.
814
+ * @return An integer value with bit(s) set corresponding to
815
+ * the type of confusability found, as defined by
816
+ * enum USpoofChecks. Zero is returned if the strings
817
+ * are not confusable.
818
+ * @stable ICU 4.2
819
+ */
820
+ U_STABLE int32_t U_EXPORT2
821
+ uspoof_areConfusableUTF8(const USpoofChecker *sc,
822
+ const char *id1, int32_t length1,
823
+ const char *id2, int32_t length2,
824
+ UErrorCode *status);
825
+
826
+
827
+
828
+
829
+ #if U_SHOW_CPLUSPLUS_API
830
+ /**
831
+ * Check the whether two specified strings are visually confusable.
832
+ * The types of confusability to be tested - single script, mixed script,
833
+ * or whole script - are determined by the check options set for the
834
+ * USpoofChecker.
835
+ *
836
+ * @param sc The USpoofChecker
837
+ * @param s1 The first of the two identifiers to be compared for
838
+ * confusability. The strings are in UTF-8 format.
839
+ * @param s2 The second of the two identifiers to be compared for
840
+ * confusability. The strings are in UTF-8 format.
841
+ * @param status The error code, set if an error occurred while attempting to
842
+ * perform the check.
843
+ * Confusability of the identifiers is not reported here,
844
+ * but through this function's return value.
845
+ * @return An integer value with bit(s) set corresponding to
846
+ * the type of confusability found, as defined by
847
+ * enum USpoofChecks. Zero is returned if the identifiers
848
+ * are not confusable.
849
+ * @stable ICU 4.2
850
+ */
851
+ U_STABLE int32_t U_EXPORT2
852
+ uspoof_areConfusableUnicodeString(const USpoofChecker *sc,
853
+ const icu::UnicodeString &s1,
854
+ const icu::UnicodeString &s2,
855
+ UErrorCode *status);
856
+ #endif
857
+
858
+
859
+ /**
860
+ * Get the "skeleton" for an identifier.
861
+ * Skeletons are a transformation of the input identifier;
862
+ * Two identifiers are confusable if their skeletons are identical.
863
+ * See Unicode UAX #39 for additional information.
864
+ *
865
+ * Using skeletons directly makes it possible to quickly check
866
+ * whether an identifier is confusable with any of some large
867
+ * set of existing identifiers, by creating an efficiently
868
+ * searchable collection of the skeletons.
869
+ *
870
+ * @param sc The USpoofChecker
871
+ * @param type The type of skeleton, corresponding to which
872
+ * of the Unicode confusable data tables to use.
873
+ * The default is Mixed-Script, Lowercase.
874
+ * Allowed options are USPOOF_SINGLE_SCRIPT_CONFUSABLE and
875
+ * USPOOF_ANY_CASE_CONFUSABLE. The two flags may be ORed.
876
+ * @param id The input identifier whose skeleton will be computed.
877
+ * @param length The length of the input identifier, expressed in 16 bit
878
+ * UTF-16 code units, or -1 if the string is zero terminated.
879
+ * @param dest The output buffer, to receive the skeleton string.
880
+ * @param destCapacity The length of the output buffer, in 16 bit units.
881
+ * The destCapacity may be zero, in which case the function will
882
+ * return the actual length of the skeleton.
883
+ * @param status The error code, set if an error occurred while attempting to
884
+ * perform the check.
885
+ * @return The length of the skeleton string. The returned length
886
+ * is always that of the complete skeleton, even when the
887
+ * supplied buffer is too small (or of zero length)
888
+ *
889
+ * @stable ICU 4.2
890
+ */
891
+ U_STABLE int32_t U_EXPORT2
892
+ uspoof_getSkeleton(const USpoofChecker *sc,
893
+ uint32_t type,
894
+ const UChar *id, int32_t length,
895
+ UChar *dest, int32_t destCapacity,
896
+ UErrorCode *status);
897
+
898
+ /**
899
+ * Get the "skeleton" for an identifier.
900
+ * Skeletons are a transformation of the input identifier;
901
+ * Two identifiers are confusable if their skeletons are identical.
902
+ * See Unicode UAX #39 for additional information.
903
+ *
904
+ * Using skeletons directly makes it possible to quickly check
905
+ * whether an identifier is confusable with any of some large
906
+ * set of existing identifiers, by creating an efficiently
907
+ * searchable collection of the skeletons.
908
+ *
909
+ * @param sc The USpoofChecker
910
+ * @param type The type of skeleton, corresponding to which
911
+ * of the Unicode confusable data tables to use.
912
+ * The default is Mixed-Script, Lowercase.
913
+ * Allowed options are USPOOF_SINGLE_SCRIPT_CONFUSABLE and
914
+ * USPOOF_ANY_CASE. The two flags may be ORed.
915
+ * @param id The UTF-8 format identifier whose skeleton will be computed.
916
+ * @param length The length of the input string, in bytes,
917
+ * or -1 if the string is zero terminated.
918
+ * @param dest The output buffer, to receive the skeleton string.
919
+ * @param destCapacity The length of the output buffer, in bytes.
920
+ * The destCapacity may be zero, in which case the function will
921
+ * return the actual length of the skeleton.
922
+ * @param status The error code, set if an error occurred while attempting to
923
+ * perform the check. Possible Errors include U_INVALID_CHAR_FOUND
924
+ * for invalid UTF-8 sequences, and
925
+ * U_BUFFER_OVERFLOW_ERROR if the destination buffer is too small
926
+ * to hold the complete skeleton.
927
+ * @return The length of the skeleton string, in bytes. The returned length
928
+ * is always that of the complete skeleton, even when the
929
+ * supplied buffer is too small (or of zero length)
930
+ *
931
+ * @stable ICU 4.2
932
+ */
933
+ U_STABLE int32_t U_EXPORT2
934
+ uspoof_getSkeletonUTF8(const USpoofChecker *sc,
935
+ uint32_t type,
936
+ const char *id, int32_t length,
937
+ char *dest, int32_t destCapacity,
938
+ UErrorCode *status);
939
+
940
+ #if U_SHOW_CPLUSPLUS_API
941
+ /**
942
+ * Get the "skeleton" for an identifier.
943
+ * Skeletons are a transformation of the input identifier;
944
+ * Two identifiers are confusable if their skeletons are identical.
945
+ * See Unicode UAX #39 for additional information.
946
+ *
947
+ * Using skeletons directly makes it possible to quickly check
948
+ * whether an identifier is confusable with any of some large
949
+ * set of existing identifiers, by creating an efficiently
950
+ * searchable collection of the skeletons.
951
+ *
952
+ * @param sc The USpoofChecker.
953
+ * @param type The type of skeleton, corresponding to which
954
+ * of the Unicode confusable data tables to use.
955
+ * The default is Mixed-Script, Lowercase.
956
+ * Allowed options are USPOOF_SINGLE_SCRIPT_CONFUSABLE and
957
+ * USPOOF_ANY_CASE_CONFUSABLE. The two flags may be ORed.
958
+ * @param id The input identifier whose skeleton will be computed.
959
+ * @param dest The output identifier, to receive the skeleton string.
960
+ * @param status The error code, set if an error occurred while attempting to
961
+ * perform the check.
962
+ * @return A reference to the destination (skeleton) string.
963
+ *
964
+ * @stable ICU 4.2
965
+ */
966
+ U_I18N_API icu::UnicodeString & U_EXPORT2
967
+ uspoof_getSkeletonUnicodeString(const USpoofChecker *sc,
968
+ uint32_t type,
969
+ const icu::UnicodeString &id,
970
+ icu::UnicodeString &dest,
971
+ UErrorCode *status);
972
+ #endif /* U_SHOW_CPLUSPLUS_API */
973
+
974
+ /**
975
+ * Get the set of Candidate Characters for Inclusion in Identifiers, as defined
976
+ * in Unicode UAX #31, http://www.unicode.org/reports/tr31/#Table_Candidate_Characters_for_Inclusion_in_Identifiers
977
+ *
978
+ * The returned set is frozen. Ownership of the set remains with the ICU library; it must not
979
+ * be deleted by the caller.
980
+ *
981
+ * @param status The error code, set if a problem occurs while creating the set.
982
+ *
983
+ * @stable ICU 51
984
+ */
985
+ U_STABLE const USet * U_EXPORT2
986
+ uspoof_getInclusionSet(UErrorCode *status);
987
+
988
+ /**
989
+ * Get the set of characters from Recommended Scripts for Inclusion in Identifiers, as defined
990
+ * in Unicode UAX #31, http://www.unicode.org/reports/tr31/#Table_Recommended_Scripts
991
+ *
992
+ * The returned set is frozen. Ownership of the set remains with the ICU library; it must not
993
+ * be deleted by the caller.
994
+ *
995
+ * @param status The error code, set if a problem occurs while creating the set.
996
+ *
997
+ * @stable ICU 51
998
+ */
999
+ U_STABLE const USet * U_EXPORT2
1000
+ uspoof_getRecommendedSet(UErrorCode *status);
1001
+
1002
+ #if U_SHOW_CPLUSPLUS_API
1003
+
1004
+ /**
1005
+ * Get the set of Candidate Characters for Inclusion in Identifiers, as defined
1006
+ * in Unicode UAX #31, http://www.unicode.org/reports/tr31/#Table_Candidate_Characters_for_Inclusion_in_Identifiers
1007
+ *
1008
+ * The returned set is frozen. Ownership of the set remains with the ICU library; it must not
1009
+ * be deleted by the caller.
1010
+ *
1011
+ * @param status The error code, set if a problem occurs while creating the set.
1012
+ *
1013
+ * @stable ICU 51
1014
+ */
1015
+ U_STABLE const icu::UnicodeSet * U_EXPORT2
1016
+ uspoof_getInclusionUnicodeSet(UErrorCode *status);
1017
+
1018
+ /**
1019
+ * Get the set of characters from Recommended Scripts for Inclusion in Identifiers, as defined
1020
+ * in Unicode UAX #31, http://www.unicode.org/reports/tr31/#Table_Recommended_Scripts
1021
+ *
1022
+ * The returned set is frozen. Ownership of the set remains with the ICU library; it must not
1023
+ * be deleted by the caller.
1024
+ *
1025
+ * @param status The error code, set if a problem occurs while creating the set.
1026
+ *
1027
+ * @stable ICU 51
1028
+ */
1029
+ U_STABLE const icu::UnicodeSet * U_EXPORT2
1030
+ uspoof_getRecommendedUnicodeSet(UErrorCode *status);
1031
+
1032
+ #endif /* U_SHOW_CPLUSPLUS_API */
1033
+
1034
+ /**
1035
+ * Serialize the data for a spoof detector into a chunk of memory.
1036
+ * The flattened spoof detection tables can later be used to efficiently
1037
+ * instantiate a new Spoof Detector.
1038
+ *
1039
+ * The serialized spoof checker includes only the data compiled from the
1040
+ * Unicode data tables by uspoof_openFromSource(); it does not include
1041
+ * include any other state or configuration that may have been set.
1042
+ *
1043
+ * @param sc the Spoof Detector whose data is to be serialized.
1044
+ * @param data a pointer to 32-bit-aligned memory to be filled with the data,
1045
+ * can be NULL if capacity==0
1046
+ * @param capacity the number of bytes available at data,
1047
+ * or 0 for preflighting
1048
+ * @param status an in/out ICU UErrorCode; possible errors include:
1049
+ * - U_BUFFER_OVERFLOW_ERROR if the data storage block is too small for serialization
1050
+ * - U_ILLEGAL_ARGUMENT_ERROR the data or capacity parameters are bad
1051
+ * @return the number of bytes written or needed for the spoof data
1052
+ *
1053
+ * @see utrie2_openFromSerialized()
1054
+ * @stable ICU 4.2
1055
+ */
1056
+ U_STABLE int32_t U_EXPORT2
1057
+ uspoof_serialize(USpoofChecker *sc,
1058
+ void *data, int32_t capacity,
1059
+ UErrorCode *status);
1060
+
1061
+
1062
+ #endif
1063
+
1064
+ #endif /* USPOOF_H */