wcwidth
s from GNU Unifont¶wcwidth()
sometimes gives unreasonable widths for characters. To try to fix it, I've decided to try reading it in from GNU Unifont, a monospaced font with extensive support for the Unicode space.
This following section requires FontForge to be installed. The TTF files are converted to FontForge's SFD format, which is plaintext and easy to parse.
version="7.0.03"
for fontfile in ["unifont-$version", "unifont_upper-$version"]
isfile("$fontfile.ttf") || download("http://unifoundry.com/pub/unifont-$version/font-builds/$fontfile.ttf", "$fontfile.ttf")
run(`fontforge -c "Open(\"$fontfile.ttf\");Save(\"$fontfile.sfd\");Quit(0);"`)
end
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 11.5M 100 11.5M 0 0 782k 0 0:00:15 0:00:15 --:--:-- 1216k Copyright (c) 2000-2012 by George Williams. Executable based on sources from 14:57 GMT 31-Jul-2012-NoPython-D. Library based on sources from 14:57 GMT 31-Jul-2012. Copyright (c) 2000-2012 by George Williams. Executable based on sources from 14:57 GMT 31-Jul-2012-NoPython-D. Library based on sources from 14:57 GMT 31-Jul-2012.
#Read sfdfile for character widths
function parsesfd(filename::String, CharWidths::Dict{Int,Int}=Dict{Int,Int}())
state=:seekchar
for line in readlines(open(filename))
if state==:seekchar #StartChar: nonmarkingreturn
if contains(line, "StartChar: ")
codepoint = nothing
width = nothing
state = :readdata
end
elseif state==:readdata #Encoding: 65538 -1 2, Width: 1024
contains(line, "Encoding:") && (codepoint = int(split(line)[3]))
contains(line, "Width:") && (width = int(split(line)[2]))
if codepoint!=nothing && width!=nothing
CharWidths[codepoint]=width
state = :seekchar
end
end
end
CharWidths
end
@time CharWidths=parsesfd("unifont-$version.sfd")
println("Number of character widths read: ", length(CharWidths))
@time CharWidths=parsesfd("unifont_upper-$version.sfd", CharWidths)
println("Number of character widths read: ", length(CharWidths))
elapsed time: 2.246724395 seconds (643812028 bytes allocated, 11.88% gc time) Number of character widths read: 57086 elapsed time: 0.164675615 seconds (69489776 bytes allocated) Number of character widths read: 63545
This section assumes that libmojibake is installed and available somewhere in the current library path.
#Load data for Unicode general categories
general_category_abbr=[
"Lu", "Ll", "Lt", "Lm", "Lo", "Mn", "Mc", "Me", "Nd", "Nl",
"No", "Pc", "Pd", "Ps", "Pe", "Pi", "Pf", "Po", "Sm", "Sc",
"Sk", "So", "Zs", "Zl", "Zp", "Cc", "Cf", "Cs", "Co", "Cn"
];
abbr(catcode)= catcode==0 ? "00" : general_category_abbr[catcode]
#catcode(c)=Base.UTF8proc.category_code(int32(c))
catcode(c)=unsafe_load(ccall((:utf8proc_get_property,:libmojibake), Ptr{Uint16}, (Int32,), c))
catabbr(c)=abbr(catcode(c))
catabbr (generic function with 1 method)
#Load data for Unicode character names
charname=Dict()
isfile("UnicodeData.txt") || download("http://www.unicode.org/Public/UNIDATA/UnicodeData.txt",
"UnicodeData.txt")
for line in readlines(open("UnicodeData.txt"))
tokens = split(line, ';')
length(tokens)≥11 && (charname[uint32("0x"*tokens[1])] = tokens[2]*"/"*tokens[11])
end
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1474k 100 1474k 0 0 838k 0 0:00:01 0:00:01 --:--:-- 838k
#UAX 11: East Asian Width
isfile("EastAsianWidth.txt") || download("http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt", "EastAsianWidth.txt")
for line in readlines(open("EastAsianWidth.txt"))
#Strip comments
line[1] == '#' && continue
precomment = split(line, '#')[1]
#Parse code point range and width code
tokens = split(precomment, ';')
length(tokens)≥2 || continue
charrange = tokens[1]
width = strip(tokens[2])
#Parse code point range into Julia UnitRange
rangetokens = split(charrange, "..")
charstart = uint32("0x"*rangetokens[1])
charend = uint32("0x"*rangetokens[length(rangetokens)>1 ? 2 : 1])
#Assign widths
for c in charstart:charend
width=="N" && continue #Ignore neutral characters
CharWidths[c]=(width=="W" || width=="F") ? 2 : #Wide or full
(width=="Na"|| width=="H" || width=="A") ? 1 : #Narrow or half or ambiguous (default to narrow in non-East-Asian contexts, which we can assume to be the default)
error("Unknown East Asian width code: $width for code point: $c")
end
end
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 146k 100 146k 0 0 240k 0 --:--:-- --:--:-- --:--:-- 240k
#Unicode character type for pretty printing
import Base:convert, show
type UniChar
c::Char
end
UniChar(c::Integer)=UniChar(char(c))
convert(::Type{Char}, u::UniChar)=u.c
function show(io::IO, uc::UniChar)
c=uc.c
print(io, "0x", hex(c,6), " '", char(c))
print(io, "' category: ", catabbr(c), " name: ", get(charname, c, "N/A"))
end
UniChar(0x0423), UniChar('A')
(0x000423 'У' category: Lu name: CYRILLIC CAPITAL LETTER U/,0x000041 'A' category: Lu name: LATIN CAPITAL LETTER A/)
I assume here that a printable character is a valid Unicode character that is not in the Cn, Cs or Cc Unicode general categories.
#Working definition of isprintable
isprintable(c::Union(Char,Integer)) = c ≤ 0x10ffff && is_valid_char(c) && isprintable_category(catcode(c))
function isprintable_category(category)
!( category==Base.UTF8proc.UTF8PROC_CATEGORY_CN #Unassigned
|| category==Base.UTF8proc.UTF8PROC_CATEGORY_CS #Surrogate
|| category==Base.UTF8proc.UTF8PROC_CATEGORY_CC #Control
|| category==0 #Unknown; most of these should be CN (JuliaLang/julia#7792)
)
end
isprintable_category (generic function with 1 method)
The following code classifies all printable Unicode code points by
wcwidth
.for (c,v) in CharWidths
CharWidths[c] = v÷512
end
#Classify characters
Boxes=Dict()
for c in 0x0000:0x10ffff
width=isprintable(c) ? (haskey(CharWidths,c) ? CharWidths[c]: -1) : -1
idx = (width, int(ccall(:wcwidth, Int32, (Uint32,), c)))
Boxes[idx] = push!(get(Boxes, idx, {}), c)
end
#Output table in GFM format
print("fnt\\sys")
for j=-1:2
print("\t | ", j )
end
println("\n"*"------- | "^3 * "-------")
for i=-1:2
print("__", i, "__")
for j=-1:2
print("\t | ")
i==j && print("__")
print(length(get(Boxes, (i,j), {})))
i==j && print("__")
end
println()
end
fnt\sys | -1 | 0 | 1 | 2 ------- | ------- | ------- | ------- __-1__ | __866893__ | 1 | 2604 | 0 __0__ | 833 | __89__ | 448 | 0 __1__ | 2803 | 111 | __143522__ | 0 __2__ | 8078 | 2 | 3685 | __85043__
#Break down discrepancies by general category
function printbreakdown(characters)
catcounts=Dict()
for c in characters
ca = catabbr(c)
catcounts[ca] = push!(get(catcounts, ca, {}), c)
end
for (ca, cnt) in sort!([c for c in catcounts])
println(ca,": ",length(cnt))
end
end
for i=-1:2, j=-1:2
i==j && continue
println("\n\nfont = $i, system = $j")
haskey(Boxes,(i,j)) && printbreakdown(Boxes[i,j])
end
font = -1, system = 0 Cc: 1 font = -1, system = 1 00: 2 Cs: 2048 Ll: 100 Lu: 91 So: 363 font = -1, system = 2 font = 0, system = -1 Cf: 144 Lo: 2 Mc: 168 Me: 4 Mn: 515 font = 0, system = 1 Cf: 2 Mc: 115 Mn: 327 So: 2 Zl: 1 Zp: 1 font = 0, system = 2 font = 1, system = -1 Ll: 411 Lm: 159 Lo: 1071 Lu: 241 Mn: 241 Nd: 49 Nl: 59 No: 150 Pc: 1 Pd: 6 Pe: 7 Pf: 6 Pi: 6 Po: 89 Ps: 8 Sc: 12 Sk: 61 Sm: 4 So: 222 font = 1, system = 0 Mn: 111 font = 1, system = 2 font = 2, system = -1 Cf: 4 Ll: 51 Lm: 11 Lo: 6389 Lu: 29 Mc: 1 Mn: 2 Nd: 162 Nl: 13 No: 106 Pe: 2 Po: 150 Ps: 2 Sc: 6 Sm: 46 So: 1104 font = 2, system = 0 Mn: 2 font = 2, system = 1 Ll: 223 Lm: 2 Lo: 1650 Lu: 207 Mn: 6 Nd: 137 Nl: 1 No: 60 Pd: 2 Pe: 7 Po: 62 Ps: 7 Sc: 4 Sm: 431 So: 883 Zs: 3
#Let's drill down into the Cf characters more closely
for c in sort!([keys(CharWidths)...])
if catabbr(c)=="Cf"
println(charwidth(char(c)), " ", CharWidths[c], " ", UniChar(c))
end
end
1 1 0x0000ad '' category: Cf name: SOFT HYPHEN/ 0 2 0x000600 '' category: Cf name: ARABIC NUMBER SIGN/ 0 2 0x000601 '' category: Cf name: ARABIC SIGN SANAH/ 0 2 0x000602 '' category: Cf name: ARABIC FOOTNOTE MARKER/ 0 2 0x000603 '' category: Cf name: ARABIC SIGN SAFHA/ 0 2 0x000604 '' category: Cf name: ARABIC SIGN SAMVAT/ 0 2 0x000605 '' category: Cf name: ARABIC NUMBER MARK ABOVE/ 0 2 0x00061c '' category: Cf name: ARABIC LETTER MARK/ 0 2 0x0006dd '' category: Cf name: ARABIC END OF AYAH/ 0 2 0x00070f '' category: Cf name: SYRIAC ABBREVIATION MARK/ 0 2 0x00180e '' category: Cf name: MONGOLIAN VOWEL SEPARATOR/ 1 2 0x00200b '' category: Cf name: ZERO WIDTH SPACE/ 0 2 0x00200c '' category: Cf name: ZERO WIDTH NON-JOINER/ 0 2 0x00200d '' category: Cf name: ZERO WIDTH JOINER/ 0 2 0x00200e '' category: Cf name: LEFT-TO-RIGHT MARK/ 0 2 0x00200f '' category: Cf name: RIGHT-TO-LEFT MARK/ 0 2 0x00202a '' category: Cf name: LEFT-TO-RIGHT EMBEDDING/ 0 2 0x00202b '' category: Cf name: RIGHT-TO-LEFT EMBEDDING/ 0 2 0x00202c '' category: Cf name: POP DIRECTIONAL FORMATTING/ 0 2 0x00202d '' category: Cf name: LEFT-TO-RIGHT OVERRIDE/ 0 2 0x00202e '' category: Cf name: RIGHT-TO-LEFT OVERRIDE/ 0 2 0x002060 '' category: Cf name: WORD JOINER/ 0 2 0x002061 '' category: Cf name: FUNCTION APPLICATION/ 0 2 0x002062 '' category: Cf name: INVISIBLE TIMES/ 0 2 0x002063 '' category: Cf name: INVISIBLE SEPARATOR/ 0 2 0x002064 '' category: Cf name: INVISIBLE PLUS/ 0 2 0x002066 '' category: Cf name: LEFT-TO-RIGHT ISOLATE/ 0 2 0x002067 '' category: Cf name: RIGHT-TO-LEFT ISOLATE/ 0 2 0x002068 '' category: Cf name: FIRST STRONG ISOLATE/ 0 2 0x002069 '' category: Cf name: POP DIRECTIONAL ISOLATE/ 0 2 0x00206a '' category: Cf name: INHIBIT SYMMETRIC SWAPPING/ 0 2 0x00206b '' category: Cf name: ACTIVATE SYMMETRIC SWAPPING/ 0 2 0x00206c '' category: Cf name: INHIBIT ARABIC FORM SHAPING/ 0 2 0x00206d '' category: Cf name: ACTIVATE ARABIC FORM SHAPING/ 0 2 0x00206e '' category: Cf name: NATIONAL DIGIT SHAPES/ 0 2 0x00206f '' category: Cf name: NOMINAL DIGIT SHAPES/ 0 2 0x00feff '' category: Cf name: ZERO WIDTH NO-BREAK SPACE/BYTE ORDER MARK 0 2 0x00fff9 '' category: Cf name: INTERLINEAR ANNOTATION ANCHOR/ 0 2 0x00fffa '' category: Cf name: INTERLINEAR ANNOTATION SEPARATOR/ 0 2 0x00fffb '' category: Cf name: INTERLINEAR ANNOTATION TERMINATOR/ 0 2 0x0110bd '' category: Cf name: KAITHI NUMBER SIGN/ 0 2 0x01bca0 '' category: Cf name: SHORTHAND FORMAT LETTER OVERLAP/ 0 2 0x01bca1 '' category: Cf name: SHORTHAND FORMAT CONTINUING OVERLAP/ 0 2 0x01bca2 '' category: Cf name: SHORTHAND FORMAT DOWN STEP/ 0 2 0x01bca3 '' category: Cf name: SHORTHAND FORMAT UP STEP/ 0 2 0x01d173 '' category: Cf name: MUSICAL SYMBOL BEGIN BEAM/ 0 2 0x01d174 '' category: Cf name: MUSICAL SYMBOL END BEAM/ 0 2 0x01d175 '' category: Cf name: MUSICAL SYMBOL BEGIN TIE/ 0 2 0x01d176 '' category: Cf name: MUSICAL SYMBOL END TIE/ 0 2 0x01d177 '' category: Cf name: MUSICAL SYMBOL BEGIN SLUR/ 0 2 0x01d178 '' category: Cf name: MUSICAL SYMBOL END SLUR/ 0 2 0x01d179 '' category: Cf name: MUSICAL SYMBOL BEGIN PHRASE/ 0 2 0x01d17a '' category: Cf name: MUSICAL SYMBOL END PHRASE/ 0 2 0x0e0001 '' category: Cf name: LANGUAGE TAG/ 0 2 0x0e0020 '' category: Cf name: TAG SPACE/ 0 2 0x0e0021 '' category: Cf name: TAG EXCLAMATION MARK/ 0 2 0x0e0022 '' category: Cf name: TAG QUOTATION MARK/ 0 2 0x0e0023 '' category: Cf name: TAG NUMBER SIGN/ 0 2 0x0e0024 '' category: Cf name: TAG DOLLAR SIGN/ 0 2 0x0e0025 '' category: Cf name: TAG PERCENT SIGN/ 0 2 0x0e0026 '' category: Cf name: TAG AMPERSAND/ 0 2 0x0e0027 '' category: Cf name: TAG APOSTROPHE/ 0 2 0x0e0028 '' category: Cf name: TAG LEFT PARENTHESIS/ 0 2 0x0e0029 '' category: Cf name: TAG RIGHT PARENTHESIS/ 0 2 0x0e002a '' category: Cf name: TAG ASTERISK/ 0 2 0x0e002b '' category: Cf name: TAG PLUS SIGN/ 0 2 0x0e002c '' category: Cf name: TAG COMMA/ 0 2 0x0e002d '' category: Cf name: TAG HYPHEN-MINUS/ 0 2 0x0e002e '' category: Cf name: TAG FULL STOP/ 0 2 0x0e002f '' category: Cf name: TAG SOLIDUS/ 0 2 0x0e0030 '' category: Cf name: TAG DIGIT ZERO/ 0 2 0x0e0031 '' category: Cf name: TAG DIGIT ONE/ 0 2 0x0e0032 '' category: Cf name: TAG DIGIT TWO/ 0 2 0x0e0033 '' category: Cf name: TAG DIGIT THREE/ 0 2 0x0e0034 '' category: Cf name: TAG DIGIT FOUR/ 0 2 0x0e0035 '' category: Cf name: TAG DIGIT FIVE/ 0 2 0x0e0036 '' category: Cf name: TAG DIGIT SIX/ 0 2 0x0e0037 '' category: Cf name: TAG DIGIT SEVEN/ 0 2 0x0e0038 '' category: Cf name: TAG DIGIT EIGHT/ 0 2 0x0e0039 '' category: Cf name: TAG DIGIT NINE/ 0 2 0x0e003a '' category: Cf name: TAG COLON/ 0 2 0x0e003b '' category: Cf name: TAG SEMICOLON/ 0 2 0x0e003c '' category: Cf name: TAG LESS-THAN SIGN/ 0 2 0x0e003d '' category: Cf name: TAG EQUALS SIGN/ 0 2 0x0e003e '' category: Cf name: TAG GREATER-THAN SIGN/ 0 2 0x0e003f '' category: Cf name: TAG QUESTION MARK/ 0 2 0x0e0040 '' category: Cf name: TAG COMMERCIAL AT/ 0 2 0x0e0041 '' category: Cf name: TAG LATIN CAPITAL LETTER A/ 0 2 0x0e0042 '' category: Cf name: TAG LATIN CAPITAL LETTER B/ 0 2 0x0e0043 '' category: Cf name: TAG LATIN CAPITAL LETTER C/ 0 2 0x0e0044 '' category: Cf name: TAG LATIN CAPITAL LETTER D/ 0 2 0x0e0045 '' category: Cf name: TAG LATIN CAPITAL LETTER E/ 0 2 0x0e0046 '' category: Cf name: TAG LATIN CAPITAL LETTER F/ 0 2 0x0e0047 '' category: Cf name: TAG LATIN CAPITAL LETTER G/ 0 2 0x0e0048 '' category: Cf name: TAG LATIN CAPITAL LETTER H/ 0 2 0x0e0049 '' category: Cf name: TAG LATIN CAPITAL LETTER I/ 0 2 0x0e004a '' category: Cf name: TAG LATIN CAPITAL LETTER J/ 0 2 0x0e004b '' category: Cf name: TAG LATIN CAPITAL LETTER K/ 0 2 0x0e004c '' category: Cf name: TAG LATIN CAPITAL LETTER L/ 0 2 0x0e004d '' category: Cf name: TAG LATIN CAPITAL LETTER M/ 0 2 0x0e004e '' category: Cf name: TAG LATIN CAPITAL LETTER N/ 0 2 0x0e004f '' category: Cf name: TAG LATIN CAPITAL LETTER O/ 0 2 0x0e0050 '' category: Cf name: TAG LATIN CAPITAL LETTER P/ 0 2 0x0e0051 '' category: Cf name: TAG LATIN CAPITAL LETTER Q/ 0 2 0x0e0052 '' category: Cf name: TAG LATIN CAPITAL LETTER R/ 0 2 0x0e0053 '' category: Cf name: TAG LATIN CAPITAL LETTER S/ 0 2 0x0e0054 '' category: Cf name: TAG LATIN CAPITAL LETTER T/ 0 2 0x0e0055 '' category: Cf name: TAG LATIN CAPITAL LETTER U/ 0 2 0x0e0056 '' category: Cf name: TAG LATIN CAPITAL LETTER V/ 0 2 0x0e0057 '' category: Cf name: TAG LATIN CAPITAL LETTER W/ 0 2 0x0e0058 '' category: Cf name: TAG LATIN CAPITAL LETTER X/ 0 2 0x0e0059 '' category: Cf name: TAG LATIN CAPITAL LETTER Y/ 0 2 0x0e005a '' category: Cf name: TAG LATIN CAPITAL LETTER Z/ 0 2 0x0e005b '' category: Cf name: TAG LEFT SQUARE BRACKET/ 0 2 0x0e005c '' category: Cf name: TAG REVERSE SOLIDUS/ 0 2 0x0e005d '' category: Cf name: TAG RIGHT SQUARE BRACKET/ 0 2 0x0e005e '' category: Cf name: TAG CIRCUMFLEX ACCENT/ 0 2 0x0e005f '' category: Cf name: TAG LOW LINE/ 0 2 0x0e0060 '' category: Cf name: TAG GRAVE ACCENT/ 0 2 0x0e0061 '' category: Cf name: TAG LATIN SMALL LETTER A/ 0 2 0x0e0062 '' category: Cf name: TAG LATIN SMALL LETTER B/ 0 2 0x0e0063 '' category: Cf name: TAG LATIN SMALL LETTER C/ 0 2 0x0e0064 '' category: Cf name: TAG LATIN SMALL LETTER D/ 0 2 0x0e0065 '' category: Cf name: TAG LATIN SMALL LETTER E/ 0 2 0x0e0066 '' category: Cf name: TAG LATIN SMALL LETTER F/ 0 2 0x0e0067 '' category: Cf name: TAG LATIN SMALL LETTER G/ 0 2 0x0e0068 '' category: Cf name: TAG LATIN SMALL LETTER H/ 0 2 0x0e0069 '' category: Cf name: TAG LATIN SMALL LETTER I/ 0 2 0x0e006a '' category: Cf name: TAG LATIN SMALL LETTER J/ 0 2 0x0e006b '' category: Cf name: TAG LATIN SMALL LETTER K/ 0 2 0x0e006c '' category: Cf name: TAG LATIN SMALL LETTER L/ 0 2 0x0e006d '' category: Cf name: TAG LATIN SMALL LETTER M/ 0 2 0x0e006e '' category: Cf name: TAG LATIN SMALL LETTER N/ 0 2 0x0e006f '' category: Cf name: TAG LATIN SMALL LETTER O/ 0 2 0x0e0070 '' category: Cf name: TAG LATIN SMALL LETTER P/ 0 2 0x0e0071 '' category: Cf name: TAG LATIN SMALL LETTER Q/ 0 2 0x0e0072 '' category: Cf name: TAG LATIN SMALL LETTER R/ 0 2 0x0e0073 '' category: Cf name: TAG LATIN SMALL LETTER S/ 0 2 0x0e0074 '' category: Cf name: TAG LATIN SMALL LETTER T/ 0 2 0x0e0075 '' category: Cf name: TAG LATIN SMALL LETTER U/ 0 2 0x0e0076 '' category: Cf name: TAG LATIN SMALL LETTER V/ 0 2 0x0e0077 '' category: Cf name: TAG LATIN SMALL LETTER W/ 0 2 0x0e0078 '' category: Cf name: TAG LATIN SMALL LETTER X/ 0 2 0x0e0079 '' category: Cf name: TAG LATIN SMALL LETTER Y/ 0 2 0x0e007a '' category: Cf name: TAG LATIN SMALL LETTER Z/ 0 2 0x0e007b '' category: Cf name: TAG LEFT CURLY BRACKET/ 0 2 0x0e007c '' category: Cf name: TAG VERTICAL LINE/ 0 2 0x0e007d '' category: Cf name: TAG RIGHT CURLY BRACKET/ 0 2 0x0e007e '' category: Cf name: TAG TILDE/ 0 2 0x0e007f '' category: Cf name: CANCEL TAG/
Most of these should have width zero, except the Arabic characters [[0x0601:0x0603]..., 0x06dd]
, which the standard says:
Unlike most other format control
characters, however, they should be rendered with a visible glyph, even in circumstances where no suitable digit or sequence of digits follows them in logical order." - Unicode Standard v.6.2.0, Section 8.2 - Arabic (p.256)
for c in sort!([keys(CharWidths)...])
if catabbr(c)=="Cf" && c∉[0x0601, 0x0602, 0x0603,0x06dd]
CharWidths[c]=0
end
end
for c in sort!([keys(CharWidths)...])
if catabbr(c)=="Cf" && (charwidth(char(c)) != CharWidths[c])
println(charwidth(char(c)), " ", CharWidths[c], " ", UniChar(c))
end
end
1 0 0x0000ad '' category: Cf name: SOFT HYPHEN/ 0 2 0x000601 '' category: Cf name: ARABIC SIGN SANAH/ 0 2 0x000602 '' category: Cf name: ARABIC FOOTNOTE MARKER/ 0 2 0x000603 '' category: Cf name: ARABIC SIGN SAFHA/ 0 2 0x0006dd '' category: Cf name: ARABIC END OF AYAH/ 1 0 0x00200b '' category: Cf name: ZERO WIDTH SPACE/
I think the remaining discrepancies can all be resolved in favor of the current values.
#Let's drill down into the spacing characters more closely
for c in 0x0000:0xffff
if catabbr(c)=="Zl" || catabbr(c)=="Zp" || catabbr(c)=="Zs"
println(charwidth(char(c)), " ", CharWidths[c], " ", UniChar(c))
end
end
1 1 0x000020 ' ' category: Zs name: SPACE/ 1 1 0x0000a0 ' ' category: Zs name: NO-BREAK SPACE/NON-BREAKING SPACE 1 2 0x001680 ' ' category: Zs name: OGHAM SPACE MARK/ 1 1 0x002000 ' ' category: Zs name: EN QUAD/ 1 1 0x002001 ' ' category: Zs name: EM QUAD/ 1 1 0x002002 ' ' category: Zs name: EN SPACE/ 1 1 0x002003 ' ' category: Zs name: EM SPACE/ 1 1 0x002004 ' ' category: Zs name: THREE-PER-EM SPACE/ 1 1 0x002005 ' ' category: Zs name: FOUR-PER-EM SPACE/ 1 1 0x002006 ' ' category: Zs name: SIX-PER-EM SPACE/ 1 1 0x002007 ' ' category: Zs name: FIGURE SPACE/ 1 1 0x002008 ' ' category: Zs name: PUNCTUATION SPACE/ 1 1 0x002009 ' ' category: Zs name: THIN SPACE/ 1 1 0x00200a ' ' category: Zs name: HAIR SPACE/ 1 2 0x002028 ' ' category: Zl name: LINE SEPARATOR/ 1 2 0x002029 ' ' category: Zp name: PARAGRAPH SEPARATOR/ 1 2 0x00202f ' ' category: Zs name: NARROW NO-BREAK SPACE/ 1 1 0x00205f ' ' category: Zs name: MEDIUM MATHEMATICAL SPACE/ 2 2 0x003000 ' ' category: Zs name: IDEOGRAPHIC SPACE/
#By definition, should have zero width (on the same line)
#0x002028 '
' category: Zl name: LINE SEPARATOR/
#0x002029 '
' category: Zp name: PARAGRAPH SEPARATOR/
CharWidths[0x2028]=0
CharWidths[0x2029]=0
0
#By definition, should be narrow = width of 1 en space
#0x00202f ' ' category: Zs name: NARROW NO-BREAK SPACE/
CharWidths[0x202f]=1
1
#By definition, should be wide = width of 1 em space
#0x002001 ' ' category: Zs name: EM QUAD/
#0x002003 ' ' category: Zs name: EM SPACE/
CharWidths[0x2001]=2
CharWidths[0x2003]=2
2
for c in sort!([keys(CharWidths)...])
if (catabbr(c)=="Zl" || catabbr(c)=="Zp" || catabbr(c)=="Zs") && (charwidth(char(c)) != CharWidths[c])
println(charwidth(char(c)), " ", CharWidths[c], " ", UniChar(c))
end
end
1 2 0x001680 ' ' category: Zs name: OGHAM SPACE MARK/ 1 2 0x002001 ' ' category: Zs name: EM QUAD/ 1 2 0x002003 ' ' category: Zs name: EM SPACE/ 1 0 0x002028 ' ' category: Zl name: LINE SEPARATOR/ 1 0 0x002029 ' ' category: Zp name: PARAGRAPH SEPARATOR/
Except for the Ogham space mark, which seems like it could be either width 1 or 2 depending on the choice of font glyph, the remaining discrepancies can all be resolved in favor of the current values in CharWidths
.
wcwidth()
¶function printccode(ucs::UnitRange, v::Integer)
if length(ucs)==1
println("\tif (ucs==0x", hex(firstc), ") return ", v, ";")
else
println("\tif (ucs>=0x", hex(firstc), " && ucs<=0x", hex(lastc), ") return ", currentv, ";")
end
end
currentv = 0
firstc = 0
lastc = 0
println("int mk_wcwidth(wchar_t ucs)")
println("{")
for c in 0x0000:0x10ffff
#If not printable character, wcwidth = -1
#If charwidth is not defined, assume category Cn (unassigned = not printable)
v = isprintable(c) ? (haskey(CharWidths, c) ? CharWidths[c] : -1) : -1
if v ≠ currentv
lastc>0 && printccode(firstc:lastc, currentv)
firstc, currentv = c, v
end
lastc = c
end
printccode(firstc:lastc, currentv)
println("}")
int mk_wcwidth(wchar_t ucs) { if (ucs>=0x0 && ucs<=0x1f) return -1; if (ucs>=0x20 && ucs<=0x7e) return 1; if (ucs>=0x7f && ucs<=0x9f) return -1; if (ucs>=0xa0 && ucs<=0xac) return 1; if (ucs==0xad) return 0; if (ucs>=0xae && ucs<=0x377) return 1; if (ucs>=0x378 && ucs<=0x379) return -1; if (ucs>=0x37a && ucs<=0x37f) return 1; if (ucs>=0x380 && ucs<=0x383) return -1; if (ucs>=0x384 && ucs<=0x38a) return 1; if (ucs==0x38b) return -1; if (ucs==0x38c) return 1; if (ucs==0x38d) return -1; if (ucs>=0x38e && ucs<=0x3a1) return 1; if (ucs==0x3a2) return -1; if (ucs>=0x3a3 && ucs<=0x482) return 1; if (ucs>=0x483 && ucs<=0x489) return 0; if (ucs>=0x48a && ucs<=0x529) return 1; if (ucs>=0x52a && ucs<=0x52b) return 2; if (ucs>=0x52c && ucs<=0x52f) return 1; if (ucs==0x530) return -1; if (ucs>=0x531 && ucs<=0x556) return 1; if (ucs>=0x557 && ucs<=0x558) return -1; if (ucs>=0x559 && ucs<=0x55f) return 1; if (ucs==0x560) return -1; if (ucs>=0x561 && ucs<=0x587) return 1; if (ucs==0x588) return -1; if (ucs>=0x589 && ucs<=0x58a) return 1; if (ucs>=0x58b && ucs<=0x58c) return -1; if (ucs>=0x58d && ucs<=0x58e) return 2; if (ucs==0x58f) return 1; if (ucs==0x590) return -1; if (ucs>=0x591 && ucs<=0x5bd) return 0; if (ucs==0x5be) return 1; if (ucs==0x5bf) return 0; if (ucs==0x5c0) return 1; if (ucs>=0x5c1 && ucs<=0x5c2) return 0; if (ucs==0x5c3) return 1; if (ucs>=0x5c4 && ucs<=0x5c5) return 0; if (ucs==0x5c6) return 1; if (ucs==0x5c7) return 0; if (ucs>=0x5c8 && ucs<=0x5cf) return -1; if (ucs>=0x5d0 && ucs<=0x5ea) return 1; if (ucs>=0x5eb && ucs<=0x5ef) return -1; if (ucs>=0x5f0 && ucs<=0x5f4) return 1; if (ucs>=0x5f5 && ucs<=0x5ff) return -1; if (ucs==0x600) return 0; if (ucs>=0x601 && ucs<=0x603) return 2; if (ucs>=0x604 && ucs<=0x605) return 0; if (ucs>=0x606 && ucs<=0x608) return 2; if (ucs>=0x609 && ucs<=0x60a) return 1; if (ucs==0x60b) return 2; if (ucs>=0x60c && ucs<=0x60d) return 1; if (ucs>=0x60e && ucs<=0x60f) return 2; if (ucs>=0x610 && ucs<=0x61a) return 0; if (ucs==0x61b) return 1; if (ucs==0x61c) return 0; if (ucs==0x61d) return -1; if (ucs==0x61e) return 2; if (ucs>=0x61f && ucs<=0x646) return 1; if (ucs==0x647) return 2; if (ucs>=0x648 && ucs<=0x64a) return 1; if (ucs>=0x64b && ucs<=0x65f) return 0; if (ucs>=0x660 && ucs<=0x66e) return 1; if (ucs==0x66f) return 2; if (ucs==0x670) return 0; if (ucs>=0x671 && ucs<=0x6a9) return 1; if (ucs==0x6aa) return 2; if (ucs>=0x6ab && ucs<=0x6d5) return 1; if (ucs>=0x6d6 && ucs<=0x6dc) return 0; if (ucs==0x6dd) return 2; if (ucs>=0x6de && ucs<=0x6e4) return 0; if (ucs>=0x6e5 && ucs<=0x6e6) return 1; if (ucs>=0x6e7 && ucs<=0x6e8) return 0; if (ucs==0x6e9) return 2; if (ucs>=0x6ea && ucs<=0x6ed) return 0; if (ucs>=0x6ee && ucs<=0x6fe) return 1; if (ucs>=0x6ff && ucs<=0x70d) return 2; if (ucs==0x70e) return -1; if (ucs==0x70f) return 0; if (ucs==0x710) return 2; if (ucs==0x711) return 0; if (ucs>=0x712 && ucs<=0x72f) return 2; if (ucs>=0x730 && ucs<=0x74a) return 0; if (ucs>=0x74b && ucs<=0x74c) return -1; if (ucs>=0x74d && ucs<=0x74f) return 2; if (ucs>=0x750 && ucs<=0x78f) return 1; if (ucs==0x790) return 2; if (ucs>=0x791 && ucs<=0x79c) return 1; if (ucs>=0x79d && ucs<=0x79f) return 2; if (ucs>=0x7a0 && ucs<=0x7a5) return 1; if (ucs>=0x7a6 && ucs<=0x7b0) return 0; if (ucs==0x7b1) return 1; if (ucs>=0x7b2 && ucs<=0x7bf) return -1; if (ucs>=0x7c0 && ucs<=0x7ea) return 1; if (ucs>=0x7eb && ucs<=0x7f3) return 0; if (ucs>=0x7f4 && ucs<=0x7fa) return 1; if (ucs>=0x7fb && ucs<=0x7ff) return -1; if (ucs>=0x800 && ucs<=0x815) return 2; if (ucs>=0x816 && ucs<=0x819) return 0; if (ucs==0x81a) return 2; if (ucs>=0x81b && ucs<=0x823) return 0; if (ucs==0x824) return 2; if (ucs>=0x825 && ucs<=0x827) return 0; if (ucs==0x828) return 2; if (ucs>=0x829 && ucs<=0x82d) return 0; if (ucs>=0x82e && ucs<=0x82f) return -1; if (ucs>=0x830 && ucs<=0x83e) return 2; if (ucs==0x83f) return -1; if (ucs>=0x840 && ucs<=0x858) return 2; if (ucs>=0x859 && ucs<=0x85b) return 0; if (ucs>=0x85c && ucs<=0x85d) return -1; if (ucs==0x85e) return 2; if (ucs>=0x85f && ucs<=0x89f) return -1; if (ucs>=0x8a0 && ucs<=0x8b2) return 1; if (ucs>=0x8b3 && ucs<=0x8e3) return -1; if (ucs>=0x8e4 && ucs<=0x903) return 0; if (ucs>=0x904 && ucs<=0x939) return 2; if (ucs>=0x93a && ucs<=0x93c) return 0; if (ucs==0x93d) return 2; if (ucs>=0x93e && ucs<=0x94f) return 0; if (ucs==0x950) return 2; if (ucs>=0x951 && ucs<=0x957) return 0; if (ucs>=0x958 && ucs<=0x961) return 2; if (ucs>=0x962 && ucs<=0x963) return 0; if (ucs>=0x964 && ucs<=0x980) return 2; if (ucs>=0x981 && ucs<=0x983) return 0; if (ucs==0x984) return -1; if (ucs>=0x985 && ucs<=0x98c) return 2; if (ucs>=0x98d && ucs<=0x98e) return -1; if (ucs>=0x98f && ucs<=0x990) return 2; if (ucs>=0x991 && ucs<=0x992) return -1; if (ucs>=0x993 && ucs<=0x9a8) return 2; if (ucs==0x9a9) return -1; if (ucs>=0x9aa && ucs<=0x9b0) return 2; if (ucs==0x9b1) return -1; if (ucs==0x9b2) return 2; if (ucs>=0x9b3 && ucs<=0x9b5) return -1; if (ucs>=0x9b6 && ucs<=0x9b9) return 2; if (ucs>=0x9ba && ucs<=0x9bb) return -1; if (ucs==0x9bc) return 0; if (ucs==0x9bd) return 2; if (ucs>=0x9be && ucs<=0x9c4) return 0; if (ucs>=0x9c5 && ucs<=0x9c6) return -1; if (ucs>=0x9c7 && ucs<=0x9c8) return 0; if (ucs>=0x9c9 && ucs<=0x9ca) return -1; if (ucs>=0x9cb && ucs<=0x9cd) return 0; if (ucs==0x9ce) return 2; if (ucs>=0x9cf && ucs<=0x9d6) return -1; if (ucs==0x9d7) return 0; if (ucs>=0x9d8 && ucs<=0x9db) return -1; if (ucs>=0x9dc && ucs<=0x9dd) return 2; if (ucs==0x9de) return -1; if (ucs>=0x9df && ucs<=0x9e1) return 2; if (ucs>=0x9e2 && ucs<=0x9e3) return 0; if (ucs>=0x9e4 && ucs<=0x9e5) return -1; if (ucs>=0x9e6 && ucs<=0x9fb) return 2; if (ucs>=0x9fc && ucs<=0xa00) return -1; if (ucs>=0xa01 && ucs<=0xa03) return 0; if (ucs==0xa04) return -1; if (ucs>=0xa05 && ucs<=0xa0a) return 2; if (ucs>=0xa0b && ucs<=0xa0e) return -1; if (ucs>=0xa0f && ucs<=0xa10) return 2; if (ucs>=0xa11 && ucs<=0xa12) return -1; if (ucs>=0xa13 && ucs<=0xa28) return 2; if (ucs==0xa29) return -1; if (ucs>=0xa2a && ucs<=0xa30) return 2; if (ucs==0xa31) return -1; if (ucs>=0xa32 && ucs<=0xa33) return 2; if (ucs==0xa34) return -1; if (ucs>=0xa35 && ucs<=0xa36) return 2; if (ucs==0xa37) return -1; if (ucs>=0xa38 && ucs<=0xa39) return 2; if (ucs>=0xa3a && ucs<=0xa3b) return -1; if (ucs==0xa3c) return 0; if (ucs==0xa3d) return -1; if (ucs>=0xa3e && ucs<=0xa42) return 0; if (ucs>=0xa43 && ucs<=0xa46) return -1; if (ucs>=0xa47 && ucs<=0xa48) return 0; if (ucs>=0xa49 && ucs<=0xa4a) return -1; if (ucs>=0xa4b && ucs<=0xa4d) return 0; if (ucs>=0xa4e && ucs<=0xa50) return -1; if (ucs==0xa51) return 0; if (ucs>=0xa52 && ucs<=0xa58) return -1; if (ucs>=0xa59 && ucs<=0xa5c) return 2; if (ucs==0xa5d) return -1; if (ucs==0xa5e) return 2; if (ucs>=0xa5f && ucs<=0xa65) return -1; if (ucs>=0xa66 && ucs<=0xa6f) return 2; if (ucs>=0xa70 && ucs<=0xa71) return 0; if (ucs>=0xa72 && ucs<=0xa74) return 2; if (ucs==0xa75) return 0; if (ucs>=0xa76 && ucs<=0xa80) return -1; if (ucs>=0xa81 && ucs<=0xa83) return 0; if (ucs==0xa84) return -1; if (ucs>=0xa85 && ucs<=0xa8d) return 2; if (ucs==0xa8e) return -1; if (ucs>=0xa8f && ucs<=0xa91) return 2; if (ucs==0xa92) return -1; if (ucs>=0xa93 && ucs<=0xaa8) return 2; if (ucs==0xaa9) return -1; if (ucs>=0xaaa && ucs<=0xab0) return 2; if (ucs==0xab1) return -1; if (ucs>=0xab2 && ucs<=0xab3) return 2; if (ucs==0xab4) return -1; if (ucs>=0xab5 && ucs<=0xab9) return 2; if (ucs>=0xaba && ucs<=0xabb) return -1; if (ucs==0xabc) return 0; if (ucs==0xabd) return 2; if (ucs>=0xabe && ucs<=0xac5) return 0; if (ucs==0xac6) return -1; if (ucs>=0xac7 && ucs<=0xac9) return 0; if (ucs==0xaca) return -1; if (ucs>=0xacb && ucs<=0xacd) return 0; if (ucs>=0xace && ucs<=0xacf) return -1; if (ucs==0xad0) return 2; if (ucs>=0xad1 && ucs<=0xadf) return -1; if (ucs>=0xae0 && ucs<=0xae1) return 2; if (ucs>=0xae2 && ucs<=0xae3) return 0; if (ucs>=0xae4 && ucs<=0xae5) return -1; if (ucs>=0xae6 && ucs<=0xaf1) return 2; if (ucs>=0xaf2 && ucs<=0xb00) return -1; if (ucs>=0xb01 && ucs<=0xb03) return 0; if (ucs==0xb04) return -1; if (ucs>=0xb05 && ucs<=0xb0c) return 2; if (ucs>=0xb0d && ucs<=0xb0e) return -1; if (ucs>=0xb0f && ucs<=0xb10) return 2; if (ucs>=0xb11 && ucs<=0xb12) return -1; if (ucs>=0xb13 && ucs<=0xb28) return 2; if (ucs==0xb29) return -1; if (ucs>=0xb2a && ucs<=0xb30) return 2; if (ucs==0xb31) return -1; if (ucs>=0xb32 && ucs<=0xb33) return 2; if (ucs==0xb34) return -1; if (ucs>=0xb35 && ucs<=0xb39) return 2; if (ucs>=0xb3a && ucs<=0xb3b) return -1; if (ucs==0xb3c) return 0; if (ucs==0xb3d) return 2; if (ucs>=0xb3e && ucs<=0xb44) return 0; if (ucs>=0xb45 && ucs<=0xb46) return -1; if (ucs>=0xb47 && ucs<=0xb48) return 0; if (ucs>=0xb49 && ucs<=0xb4a) return -1; if (ucs>=0xb4b && ucs<=0xb4d) return 0; if (ucs>=0xb4e && ucs<=0xb55) return -1; if (ucs>=0xb56 && ucs<=0xb57) return 0; if (ucs>=0xb58 && ucs<=0xb5b) return -1; if (ucs>=0xb5c && ucs<=0xb5d) return 2; if (ucs==0xb5e) return -1; if (ucs>=0xb5f && ucs<=0xb61) return 2; if (ucs>=0xb62 && ucs<=0xb63) return 0; if (ucs>=0xb64 && ucs<=0xb65) return -1; if (ucs>=0xb66 && ucs<=0xb77) return 2; if (ucs>=0xb78 && ucs<=0xb81) return -1; if (ucs==0xb82) return 0; if (ucs==0xb83) return 2; if (ucs==0xb84) return -1; if (ucs>=0xb85 && ucs<=0xb8a) return 2; if (ucs>=0xb8b && ucs<=0xb8d) return -1; if (ucs>=0xb8e && ucs<=0xb90) return 2; if (ucs==0xb91) return -1; if (ucs>=0xb92 && ucs<=0xb95) return 2; if (ucs>=0xb96 && ucs<=0xb98) return -1; if (ucs>=0xb99 && ucs<=0xb9a) return 2; if (ucs==0xb9b) return -1; if (ucs==0xb9c) return 2; if (ucs==0xb9d) return -1; if (ucs>=0xb9e && ucs<=0xb9f) return 2; if (ucs>=0xba0 && ucs<=0xba2) return -1; if (ucs>=0xba3 && ucs<=0xba4) return 2; if (ucs>=0xba5 && ucs<=0xba7) return -1; if (ucs>=0xba8 && ucs<=0xbaa) return 2; if (ucs>=0xbab && ucs<=0xbad) return -1; if (ucs>=0xbae && ucs<=0xbb9) return 2; if (ucs>=0xbba && ucs<=0xbbd) return -1; if (ucs>=0xbbe && ucs<=0xbc2) return 0; if (ucs>=0xbc3 && ucs<=0xbc5) return -1; if (ucs>=0xbc6 && ucs<=0xbc8) return 0; if (ucs==0xbc9) return -1; if (ucs>=0xbca && ucs<=0xbcd) return 0; if (ucs>=0xbce && ucs<=0xbcf) return -1; if (ucs==0xbd0) return 0; if (ucs>=0xbd1 && ucs<=0xbd6) return -1; if (ucs==0xbd7) return 0; if (ucs>=0xbd8 && ucs<=0xbe5) return -1; if (ucs>=0xbe6 && ucs<=0xbfa) return 2; if (ucs>=0xbfb && ucs<=0xbff) return -1; if (ucs>=0xc00 && ucs<=0xc03) return 0; if (ucs==0xc04) return -1; if (ucs>=0xc05 && ucs<=0xc0c) return 2; if (ucs==0xc0d) return -1; if (ucs>=0xc0e && ucs<=0xc10) return 2; if (ucs==0xc11) return -1; if (ucs>=0xc12 && ucs<=0xc28) return 2; if (ucs==0xc29) return -1; if (ucs>=0xc2a && ucs<=0xc39) return 2; if (ucs>=0xc3a && ucs<=0xc3c) return -1; if (ucs==0xc3d) return 2; if (ucs>=0xc3e && ucs<=0xc44) return 0; if (ucs==0xc45) return -1; if (ucs>=0xc46 && ucs<=0xc48) return 0; if (ucs==0xc49) return -1; if (ucs>=0xc4a && ucs<=0xc4d) return 0; if (ucs>=0xc4e && ucs<=0xc54) return -1; if (ucs>=0xc55 && ucs<=0xc56) return 0; if (ucs==0xc57) return -1; if (ucs>=0xc58 && ucs<=0xc59) return 2; if (ucs>=0xc5a && ucs<=0xc5f) return -1; if (ucs>=0xc60 && ucs<=0xc61) return 2; if (ucs>=0xc62 && ucs<=0xc63) return 0; if (ucs>=0xc64 && ucs<=0xc65) return -1; if (ucs>=0xc66 && ucs<=0xc6f) return 2; if (ucs>=0xc70 && ucs<=0xc77) return -1; if (ucs>=0xc78 && ucs<=0xc7f) return 2; if (ucs==0xc80) return -1; if (ucs>=0xc81 && ucs<=0xc83) return 0; if (ucs==0xc84) return -1; if (ucs>=0xc85 && ucs<=0xc8c) return 2; if (ucs==0xc8d) return -1; if (ucs>=0xc8e && ucs<=0xc90) return 2; if (ucs==0xc91) return -1; if (ucs>=0xc92 && ucs<=0xca8) return 2; if (ucs==0xca9) return -1; if (ucs>=0xcaa && ucs<=0xcb3) return 2; if (ucs==0xcb4) return -1; if (ucs>=0xcb5 && ucs<=0xcb9) return 2; if (ucs>=0xcba && ucs<=0xcbb) return -1; if (ucs==0xcbc) return 0; if (ucs==0xcbd) return 2; if (ucs>=0xcbe && ucs<=0xcc4) return 0; if (ucs==0xcc5) return -1; if (ucs>=0xcc6 && ucs<=0xcc8) return 0; if (ucs==0xcc9) return -1; if (ucs>=0xcca && ucs<=0xccd) return 0; if (ucs>=0xcce && ucs<=0xcd4) return -1; if (ucs>=0xcd5 && ucs<=0xcd6) return 0; if (ucs>=0xcd7 && ucs<=0xcdd) return -1; if (ucs==0xcde) return 2; if (ucs==0xcdf) return -1; if (ucs>=0xce0 && ucs<=0xce1) return 2; if (ucs>=0xce2 && ucs<=0xce3) return 0; if (ucs>=0xce4 && ucs<=0xce5) return -1; if (ucs>=0xce6 && ucs<=0xcef) return 2; if (ucs==0xcf0) return -1; if (ucs>=0xcf1 && ucs<=0xcf2) return 2; if (ucs>=0xcf3 && ucs<=0xd00) return -1; if (ucs>=0xd01 && ucs<=0xd03) return 0; if (ucs==0xd04) return -1; if (ucs>=0xd05 && ucs<=0xd0c) return 2; if (ucs==0xd0d) return -1; if (ucs>=0xd0e && ucs<=0xd10) return 2; if (ucs==0xd11) return -1; if (ucs>=0xd12 && ucs<=0xd3a) return 2; if (ucs>=0xd3b && ucs<=0xd3c) return -1; if (ucs==0xd3d) return 2; if (ucs>=0xd3e && ucs<=0xd44) return 0; if (ucs==0xd45) return -1; if (ucs>=0xd46 && ucs<=0xd48) return 0; if (ucs==0xd49) return -1; if (ucs>=0xd4a && ucs<=0xd4d) return 0; if (ucs==0xd4e) return 2; if (ucs>=0xd4f && ucs<=0xd56) return -1; if (ucs==0xd57) return 0; if (ucs>=0xd58 && ucs<=0xd5f) return -1; if (ucs>=0xd60 && ucs<=0xd61) return 2; if (ucs>=0xd62 && ucs<=0xd63) return 0; if (ucs>=0xd64 && ucs<=0xd65) return -1; if (ucs>=0xd66 && ucs<=0xd75) return 2; if (ucs>=0xd76 && ucs<=0xd78) return -1; if (ucs>=0xd79 && ucs<=0xd7f) return 2; if (ucs>=0xd80 && ucs<=0xd81) return -1; if (ucs>=0xd82 && ucs<=0xd83) return 0; if (ucs==0xd84) return -1; if (ucs>=0xd85 && ucs<=0xd96) return 2; if (ucs>=0xd97 && ucs<=0xd99) return -1; if (ucs>=0xd9a && ucs<=0xdb1) return 2; if (ucs==0xdb2) return -1; if (ucs>=0xdb3 && ucs<=0xdbb) return 2; if (ucs==0xdbc) return -1; if (ucs==0xdbd) return 2; if (ucs>=0xdbe && ucs<=0xdbf) return -1; if (ucs>=0xdc0 && ucs<=0xdc6) return 2; if (ucs>=0xdc7 && ucs<=0xdc9) return -1; if (ucs==0xdca) return 0; if (ucs>=0xdcb && ucs<=0xdce) return -1; if (ucs>=0xdcf && ucs<=0xdd4) return 0; if (ucs==0xdd5) return -1; if (ucs==0xdd6) return 0; if (ucs==0xdd7) return -1; if (ucs>=0xdd8 && ucs<=0xddf) return 0; if (ucs>=0xde0 && ucs<=0xde5) return -1; if (ucs>=0xde6 && ucs<=0xdef) return 2; if (ucs>=0xdf0 && ucs<=0xdf1) return -1; if (ucs>=0xdf2 && ucs<=0xdf3) return 0; if (ucs==0xdf4) return 2; if (ucs>=0xdf5 && ucs<=0xe00) return -1; if (ucs>=0xe01 && ucs<=0xe30) return 1; if (ucs==0xe31) return 0; if (ucs>=0xe32 && ucs<=0xe33) return 1; if (ucs>=0xe34 && ucs<=0xe3a) return 0; if (ucs>=0xe3b && ucs<=0xe3e) return -1; if (ucs>=0xe3f && ucs<=0xe46) return 1; if (ucs>=0xe47 && ucs<=0xe4e) return 0; if (ucs>=0xe4f && ucs<=0xe5b) return 1; if (ucs>=0xe5c && ucs<=0xe80) return -1; if (ucs>=0xe81 && ucs<=0xe82) return 1; if (ucs==0xe83) return -1; if (ucs==0xe84) return 1; if (ucs>=0xe85 && ucs<=0xe86) return -1; if (ucs>=0xe87 && ucs<=0xe88) return 1; if (ucs==0xe89) return -1; if (ucs==0xe8a) return 1; if (ucs>=0xe8b && ucs<=0xe8c) return -1; if (ucs==0xe8d) return 1; if (ucs>=0xe8e && ucs<=0xe93) return -1; if (ucs>=0xe94 && ucs<=0xe97) return 1; if (ucs==0xe98) return -1; if (ucs>=0xe99 && ucs<=0xe9f) return 1; if (ucs==0xea0) return -1; if (ucs>=0xea1 && ucs<=0xea3) return 1; if (ucs==0xea4) return -1; if (ucs==0xea5) return 1; if (ucs==0xea6) return -1; if (ucs==0xea7) return 1; if (ucs>=0xea8 && ucs<=0xea9) return -1; if (ucs>=0xeaa && ucs<=0xeab) return 1; if (ucs==0xeac) return -1; if (ucs>=0xead && ucs<=0xeb0) return 1; if (ucs==0xeb1) return 0; if (ucs>=0xeb2 && ucs<=0xeb3) return 1; if (ucs>=0xeb4 && ucs<=0xeb9) return 0; if (ucs==0xeba) return -1; if (ucs>=0xebb && ucs<=0xebc) return 0; if (ucs==0xebd) return 1; if (ucs>=0xebe && ucs<=0xebf) return -1; if (ucs>=0xec0 && ucs<=0xec4) return 1; if (ucs==0xec5) return -1; if (ucs==0xec6) return 1; if (ucs==0xec7) return -1; if (ucs>=0xec8 && ucs<=0xecd) return 0; if (ucs>=0xece && ucs<=0xecf) return -1; if (ucs>=0xed0 && ucs<=0xed9) return 1; if (ucs>=0xeda && ucs<=0xedb) return -1; if (ucs>=0xedc && ucs<=0xedf) return 1; if (ucs>=0xee0 && ucs<=0xeff) return -1; if (ucs>=0xf00 && ucs<=0xf0b) return 2; if (ucs==0xf0c) return 1; if (ucs>=0xf0d && ucs<=0xf17) return 2; if (ucs>=0xf18 && ucs<=0xf19) return 0; if (ucs>=0xf1a && ucs<=0xf34) return 2; if (ucs==0xf35) return 0; if (ucs==0xf36) return 2; if (ucs==0xf37) return 0; if (ucs==0xf38) return 2; if (ucs==0xf39) return 0; if (ucs>=0xf3a && ucs<=0xf3d) return 2; if (ucs>=0xf3e && ucs<=0xf3f) return 0; if (ucs>=0xf40 && ucs<=0xf47) return 2; if (ucs==0xf48) return -1; if (ucs>=0xf49 && ucs<=0xf6c) return 2; if (ucs>=0xf6d && ucs<=0xf70) return -1; if (ucs>=0xf71 && ucs<=0xf83) return 0; if (ucs>=0xf84 && ucs<=0xf85) return 2; if (ucs>=0xf86 && ucs<=0xf87) return 0; if (ucs>=0xf88 && ucs<=0xf8b) return 2; if (ucs>=0xf8c && ucs<=0xf97) return 0; if (ucs==0xf98) return -1; if (ucs>=0xf99 && ucs<=0xfbc) return 0; if (ucs==0xfbd) return -1; if (ucs>=0xfbe && ucs<=0xfc5) return 2; if (ucs==0xfc6) return 0; if (ucs>=0xfc7 && ucs<=0xfcc) return 2; if (ucs==0xfcd) return -1; if (ucs>=0xfce && ucs<=0xfda) return 2; if (ucs>=0xfdb && ucs<=0xfff) return -1; if (ucs>=0x1000 && ucs<=0x100b) return 2; if (ucs==0x100c) return 1; if (ucs>=0x100d && ucs<=0x101f) return 2; if (ucs==0x1020) return 1; if (ucs>=0x1021 && ucs<=0x102a) return 2; if (ucs>=0x102b && ucs<=0x103e) return 0; if (ucs>=0x103f && ucs<=0x1041) return 2; if (ucs>=0x1042 && ucs<=0x1043) return 1; if (ucs>=0x1044 && ucs<=0x1049) return 2; if (ucs>=0x104a && ucs<=0x104c) return 1; if (ucs>=0x104d && ucs<=0x1053) return 2; if (ucs==0x1054) return 1; if (ucs==0x1055) return 2; if (ucs>=0x1056 && ucs<=0x1059) return 0; if (ucs>=0x105a && ucs<=0x105d) return 2; if (ucs>=0x105e && ucs<=0x1060) return 0; if (ucs==0x1061) return 2; if (ucs>=0x1062 && ucs<=0x1064) return 0; if (ucs>=0x1065 && ucs<=0x1066) return 2; if (ucs>=0x1067 && ucs<=0x106d) return 0; if (ucs>=0x106e && ucs<=0x1070) return 2; if (ucs>=0x1071 && ucs<=0x1074) return 0; if (ucs>=0x1075 && ucs<=0x1081) return 2; if (ucs>=0x1082 && ucs<=0x108d) return 0; if (ucs==0x108e) return 2; if (ucs==0x108f) return 0; if (ucs>=0x1090 && ucs<=0x1099) return 2; if (ucs>=0x109a && ucs<=0x109d) return 0; if (ucs>=0x109e && ucs<=0x109f) return 2; if (ucs>=0x10a0 && ucs<=0x10c5) return 1; if (ucs==0x10c6) return -1; if (ucs==0x10c7) return 1; if (ucs>=0x10c8 && ucs<=0x10cc) return -1; if (ucs==0x10cd) return 1; if (ucs>=0x10ce && ucs<=0x10cf) return -1; if (ucs>=0x10d0 && ucs<=0x10ff) return 1; if (ucs>=0x1100 && ucs<=0x1248) return 2; if (ucs==0x1249) return -1; if (ucs>=0x124a && ucs<=0x124d) return 2; if (ucs>=0x124e && ucs<=0x124f) return -1; if (ucs>=0x1250 && ucs<=0x1256) return 2; if (ucs==0x1257) return -1; if (ucs==0x1258) return 2; if (ucs==0x1259) return -1; if (ucs>=0x125a && ucs<=0x125d) return 2; if (ucs>=0x125e && ucs<=0x125f) return -1; if (ucs>=0x1260 && ucs<=0x1288) return 2; if (ucs==0x1289) return -1; if (ucs>=0x128a && ucs<=0x128d) return 2; if (ucs>=0x128e && ucs<=0x128f) return -1; if (ucs>=0x1290 && ucs<=0x12b0) return 2; if (ucs==0x12b1) return -1; if (ucs>=0x12b2 && ucs<=0x12b5) return 2; if (ucs>=0x12b6 && ucs<=0x12b7) return -1; if (ucs>=0x12b8 && ucs<=0x12be) return 2; if (ucs==0x12bf) return -1; if (ucs==0x12c0) return 2; if (ucs==0x12c1) return -1; if (ucs>=0x12c2 && ucs<=0x12c5) return 2; if (ucs>=0x12c6 && ucs<=0x12c7) return -1; if (ucs>=0x12c8 && ucs<=0x12d6) return 2; if (ucs==0x12d7) return -1; if (ucs>=0x12d8 && ucs<=0x1310) return 2; if (ucs==0x1311) return -1; if (ucs>=0x1312 && ucs<=0x1315) return 2; if (ucs>=0x1316 && ucs<=0x1317) return -1; if (ucs>=0x1318 && ucs<=0x1342) return 2; if (ucs==0x1343) return 1; if (ucs>=0x1344 && ucs<=0x135a) return 2; if (ucs>=0x135b && ucs<=0x135c) return -1; if (ucs>=0x135d && ucs<=0x135f) return 0; if (ucs==0x1360) return 2; if (ucs==0x1361) return 1; if (ucs>=0x1362 && ucs<=0x137c) return 2; if (ucs>=0x137d && ucs<=0x137f) return -1; if (ucs>=0x1380 && ucs<=0x138f) return 2; if (ucs>=0x1390 && ucs<=0x1394) return 1; if (ucs==0x1395) return 2; if (ucs==0x1396) return 1; if (ucs>=0x1397 && ucs<=0x1398) return 2; if (ucs==0x1399) return 1; if (ucs>=0x139a && ucs<=0x139f) return -1; if (ucs>=0x13a0 && ucs<=0x13f4) return 1; if (ucs>=0x13f5 && ucs<=0x13ff) return -1; if (ucs>=0x1400 && ucs<=0x150b) return 1; if (ucs>=0x150c && ucs<=0x150f) return 2; if (ucs>=0x1510 && ucs<=0x156e) return 1; if (ucs==0x156f) return 2; if (ucs>=0x1570 && ucs<=0x157d) return 1; if (ucs>=0x157e && ucs<=0x1584) return 2; if (ucs>=0x1585 && ucs<=0x158d) return 1; if (ucs>=0x158e && ucs<=0x1594) return 2; if (ucs==0x1595) return 1; if (ucs==0x1596) return 2; if (ucs>=0x1597 && ucs<=0x1616) return 1; if (ucs>=0x1617 && ucs<=0x1623) return 2; if (ucs>=0x1624 && ucs<=0x1627) return 1; if (ucs>=0x1628 && ucs<=0x1629) return 2; if (ucs>=0x162a && ucs<=0x1633) return 1; if (ucs>=0x1634 && ucs<=0x1635) return 2; if (ucs>=0x1636 && ucs<=0x1639) return 1; if (ucs>=0x163a && ucs<=0x163f) return 2; if (ucs>=0x1640 && ucs<=0x1641) return 1; if (ucs>=0x1642 && ucs<=0x1645) return 2; if (ucs>=0x1646 && ucs<=0x1649) return 1; if (ucs>=0x164a && ucs<=0x1659) return 2; if (ucs==0x165a) return 1; if (ucs>=0x165b && ucs<=0x166c) return 2; if (ucs>=0x166d && ucs<=0x166e) return 1; if (ucs>=0x166f && ucs<=0x1676) return 2; if (ucs>=0x1677 && ucs<=0x167f) return 1; if (ucs>=0x1680 && ucs<=0x169c) return 2; if (ucs>=0x169d && ucs<=0x169f) return -1; if (ucs>=0x16a0 && ucs<=0x16df) return 1; if (ucs==0x16e0) return 2; if (ucs==0x16e1) return 1; if (ucs==0x16e2) return 2; if (ucs>=0x16e3 && ucs<=0x16f8) return 1; if (ucs>=0x16f9 && ucs<=0x16ff) return -1; if (ucs>=0x1700 && ucs<=0x170c) return 2; if (ucs==0x170d) return -1; if (ucs>=0x170e && ucs<=0x1711) return 2; if (ucs>=0x1712 && ucs<=0x1714) return 0; if (ucs>=0x1715 && ucs<=0x171f) return -1; if (ucs>=0x1720 && ucs<=0x1731) return 2; if (ucs>=0x1732 && ucs<=0x1734) return 0; if (ucs>=0x1735 && ucs<=0x1736) return 2; if (ucs>=0x1737 && ucs<=0x173f) return -1; if (ucs>=0x1740 && ucs<=0x1751) return 2; if (ucs>=0x1752 && ucs<=0x1753) return 0; if (ucs>=0x1754 && ucs<=0x175f) return -1; if (ucs>=0x1760 && ucs<=0x1761) return 2; if (ucs==0x1762) return 1; if (ucs>=0x1763 && ucs<=0x176c) return 2; if (ucs==0x176d) return -1; if (ucs>=0x176e && ucs<=0x1770) return 2; if (ucs==0x1771) return -1; if (ucs>=0x1772 && ucs<=0x1773) return 0; if (ucs>=0x1774 && ucs<=0x177f) return -1; if (ucs>=0x1780 && ucs<=0x17b5) return 2; if (ucs>=0x17b6 && ucs<=0x17d3) return 0; if (ucs>=0x17d4 && ucs<=0x17d5) return 2; if (ucs==0x17d6) return 1; if (ucs>=0x17d7 && ucs<=0x17db) return 2; if (ucs==0x17dc) return 1; if (ucs==0x17dd) return 0; if (ucs>=0x17de && ucs<=0x17df) return -1; if (ucs>=0x17e0 && ucs<=0x17e9) return 2; if (ucs>=0x17ea && ucs<=0x17ef) return -1; if (ucs>=0x17f0 && ucs<=0x17f9) return 1; if (ucs>=0x17fa && ucs<=0x17ff) return -1; if (ucs>=0x1800 && ucs<=0x180d) return 2; if (ucs==0x180e) return 0; if (ucs==0x180f) return -1; if (ucs>=0x1810 && ucs<=0x1819) return 2; if (ucs>=0x181a && ucs<=0x181f) return -1; if (ucs>=0x1820 && ucs<=0x1877) return 2; if (ucs>=0x1878 && ucs<=0x187f) return -1; if (ucs>=0x1880 && ucs<=0x18a8) return 2; if (ucs==0x18a9) return 0; if (ucs==0x18aa) return 2; if (ucs>=0x18ab && ucs<=0x18af) return -1; if (ucs>=0x18b0 && ucs<=0x18f1) return 1; if (ucs==0x18f2) return 2; if (ucs>=0x18f3 && ucs<=0x18f5) return 1; if (ucs>=0x18f6 && ucs<=0x18ff) return -1; if (ucs>=0x1900 && ucs<=0x191e) return 2; if (ucs==0x191f) return -1; if (ucs>=0x1920 && ucs<=0x192b) return 0; if (ucs>=0x192c && ucs<=0x192f) return -1; if (ucs>=0x1930 && ucs<=0x193b) return 0; if (ucs>=0x193c && ucs<=0x193f) return -1; if (ucs==0x1940) return 2; if (ucs>=0x1941 && ucs<=0x1943) return -1; if (ucs>=0x1944 && ucs<=0x194f) return 2; if (ucs>=0x1950 && ucs<=0x196d) return 1; if (ucs>=0x196e && ucs<=0x196f) return -1; if (ucs>=0x1970 && ucs<=0x1974) return 1; if (ucs>=0x1975 && ucs<=0x197f) return -1; if (ucs>=0x1980 && ucs<=0x19ab) return 2; if (ucs>=0x19ac && ucs<=0x19af) return -1; if (ucs>=0x19b0 && ucs<=0x19c0) return 0; if (ucs>=0x19c1 && ucs<=0x19c7) return 2; if (ucs>=0x19c8 && ucs<=0x19c9) return 0; if (ucs>=0x19ca && ucs<=0x19cf) return -1; if (ucs>=0x19d0 && ucs<=0x19da) return 2; if (ucs>=0x19db && ucs<=0x19dd) return -1; if (ucs>=0x19de && ucs<=0x1a16) return 2; if (ucs>=0x1a17 && ucs<=0x1a1b) return 0; if (ucs>=0x1a1c && ucs<=0x1a1d) return -1; if (ucs>=0x1a1e && ucs<=0x1a54) return 2; if (ucs>=0x1a55 && ucs<=0x1a5e) return 0; if (ucs==0x1a5f) return -1; if (ucs>=0x1a60 && ucs<=0x1a7c) return 0; if (ucs>=0x1a7d && ucs<=0x1a7e) return -1; if (ucs==0x1a7f) return 0; if (ucs>=0x1a80 && ucs<=0x1a89) return 2; if (ucs>=0x1a8a && ucs<=0x1a8f) return -1; if (ucs>=0x1a90 && ucs<=0x1a99) return 2; if (ucs>=0x1a9a && ucs<=0x1a9f) return -1; if (ucs>=0x1aa0 && ucs<=0x1aad) return 2; if (ucs>=0x1aae && ucs<=0x1aaf) return -1; if (ucs>=0x1ab0 && ucs<=0x1abe) return 0; if (ucs>=0x1abf && ucs<=0x1aff) return -1; if (ucs>=0x1b00 && ucs<=0x1b04) return 0; if (ucs>=0x1b05 && ucs<=0x1b33) return 2; if (ucs>=0x1b34 && ucs<=0x1b44) return 0; if (ucs>=0x1b45 && ucs<=0x1b4b) return 2; if (ucs>=0x1b4c && ucs<=0x1b4f) return -1; if (ucs>=0x1b50 && ucs<=0x1b6a) return 2; if (ucs>=0x1b6b && ucs<=0x1b73) return 0; if (ucs>=0x1b74 && ucs<=0x1b7c) return 2; if (ucs>=0x1b7d && ucs<=0x1b7f) return -1; if (ucs>=0x1b80 && ucs<=0x1b82) return 0; if (ucs>=0x1b83 && ucs<=0x1ba0) return 2; if (ucs>=0x1ba1 && ucs<=0x1bad) return 0; if (ucs>=0x1bae && ucs<=0x1be5) return 2; if (ucs>=0x1be6 && ucs<=0x1bf3) return 0; if (ucs>=0x1bf4 && ucs<=0x1bfb) return -1; if (ucs>=0x1bfc && ucs<=0x1c23) return 2; if (ucs>=0x1c24 && ucs<=0x1c37) return 0; if (ucs>=0x1c38 && ucs<=0x1c3a) return -1; if (ucs>=0x1c3b && ucs<=0x1c49) return 2; if (ucs>=0x1c4a && ucs<=0x1c4c) return -1; if (ucs>=0x1c4d && ucs<=0x1c4f) return 2; if (ucs>=0x1c50 && ucs<=0x1c7f) return 1; if (ucs>=0x1c80 && ucs<=0x1cbf) return -1; if (ucs>=0x1cc0 && ucs<=0x1cc7) return 2; if (ucs>=0x1cc8 && ucs<=0x1ccf) return -1; if (ucs>=0x1cd0 && ucs<=0x1cd2) return 0; if (ucs==0x1cd3) return 2; if (ucs>=0x1cd4 && ucs<=0x1ce8) return 0; if (ucs>=0x1ce9 && ucs<=0x1cec) return 2; if (ucs==0x1ced) return 0; if (ucs>=0x1cee && ucs<=0x1cf1) return 2; if (ucs>=0x1cf2 && ucs<=0x1cf4) return 0; if (ucs>=0x1cf5 && ucs<=0x1cf6) return 2; if (ucs==0x1cf7) return -1; if (ucs>=0x1cf8 && ucs<=0x1cf9) return 0; if (ucs>=0x1cfa && ucs<=0x1cff) return -1; if (ucs>=0x1d00 && ucs<=0x1d79) return 1; if (ucs==0x1d7a) return 2; if (ucs>=0x1d7b && ucs<=0x1d94) return 1; if (ucs==0x1d95) return 2; if (ucs>=0x1d96 && ucs<=0x1dbf) return 1; if (ucs>=0x1dc0 && ucs<=0x1df5) return 0; if (ucs>=0x1df6 && ucs<=0x1dfb) return -1; if (ucs>=0x1dfc && ucs<=0x1dff) return 0; if (ucs>=0x1e00 && ucs<=0x1f15) return 1; if (ucs>=0x1f16 && ucs<=0x1f17) return -1; if (ucs>=0x1f18 && ucs<=0x1f1d) return 1; if (ucs>=0x1f1e && ucs<=0x1f1f) return -1; if (ucs>=0x1f20 && ucs<=0x1f45) return 1; if (ucs>=0x1f46 && ucs<=0x1f47) return -1; if (ucs>=0x1f48 && ucs<=0x1f4d) return 1; if (ucs>=0x1f4e && ucs<=0x1f4f) return -1; if (ucs>=0x1f50 && ucs<=0x1f57) return 1; if (ucs==0x1f58) return -1; if (ucs==0x1f59) return 1; if (ucs==0x1f5a) return -1; if (ucs==0x1f5b) return 1; if (ucs==0x1f5c) return -1; if (ucs==0x1f5d) return 1; if (ucs==0x1f5e) return -1; if (ucs>=0x1f5f && ucs<=0x1f7d) return 1; if (ucs>=0x1f7e && ucs<=0x1f7f) return -1; if (ucs>=0x1f80 && ucs<=0x1fb4) return 1; if (ucs==0x1fb5) return -1; if (ucs>=0x1fb6 && ucs<=0x1fc4) return 1; if (ucs==0x1fc5) return -1; if (ucs>=0x1fc6 && ucs<=0x1fd3) return 1; if (ucs>=0x1fd4 && ucs<=0x1fd5) return -1; if (ucs>=0x1fd6 && ucs<=0x1fdb) return 1; if (ucs==0x1fdc) return -1; if (ucs>=0x1fdd && ucs<=0x1fef) return 1; if (ucs>=0x1ff0 && ucs<=0x1ff1) return -1; if (ucs>=0x1ff2 && ucs<=0x1ff4) return 1; if (ucs==0x1ff5) return -1; if (ucs>=0x1ff6 && ucs<=0x1ffe) return 1; if (ucs==0x1fff) return -1; if (ucs==0x2000) return 1; if (ucs==0x2001) return 2; if (ucs==0x2002) return 1; if (ucs==0x2003) return 2; if (ucs>=0x2004 && ucs<=0x200a) return 1; if (ucs>=0x200b && ucs<=0x200f) return 0; if (ucs==0x2010) return 1; if (ucs==0x2011) return 2; if (ucs>=0x2012 && ucs<=0x2027) return 1; if (ucs>=0x2028 && ucs<=0x202e) return 0; if (ucs>=0x202f && ucs<=0x2056) return 1; if (ucs==0x2057) return 2; if (ucs>=0x2058 && ucs<=0x205f) return 1; if (ucs>=0x2060 && ucs<=0x2064) return 0; if (ucs==0x2065) return -1; if (ucs>=0x2066 && ucs<=0x206f) return 0; if (ucs>=0x2070 && ucs<=0x2071) return 1; if (ucs>=0x2072 && ucs<=0x2073) return -1; if (ucs>=0x2074 && ucs<=0x208e) return 1; if (ucs==0x208f) return -1; if (ucs>=0x2090 && ucs<=0x209c) return 1; if (ucs>=0x209d && ucs<=0x209f) return -1; if (ucs>=0x20a0 && ucs<=0x20b8) return 1; if (ucs==0x20b9) return 2; if (ucs>=0x20ba && ucs<=0x20bd) return 1; if (ucs>=0x20be && ucs<=0x20cf) return -1; if (ucs>=0x20d0 && ucs<=0x20f0) return 0; if (ucs>=0x20f1 && ucs<=0x20ff) return -1; if (ucs>=0x2100 && ucs<=0x2139) return 1; if (ucs>=0x213a && ucs<=0x213d) return 2; if (ucs==0x213e) return 1; if (ucs>=0x213f && ucs<=0x2140) return 2; if (ucs>=0x2141 && ucs<=0x2144) return 1; if (ucs>=0x2145 && ucs<=0x2146) return 2; if (ucs>=0x2147 && ucs<=0x214b) return 1; if (ucs==0x214c) return 2; if (ucs>=0x214d && ucs<=0x214e) return 1; if (ucs==0x214f) return 2; if (ucs>=0x2150 && ucs<=0x2181) return 1; if (ucs==0x2182) return 2; if (ucs>=0x2183 && ucs<=0x2187) return 1; if (ucs==0x2188) return 2; if (ucs==0x2189) return 1; if (ucs>=0x218a && ucs<=0x218f) return -1; if (ucs>=0x2190 && ucs<=0x21f3) return 1; if (ucs==0x21f4) return 2; if (ucs>=0x21f5 && ucs<=0x21f8) return 1; if (ucs>=0x21f9 && ucs<=0x21fc) return 2; if (ucs>=0x21fd && ucs<=0x21fe) return 1; if (ucs==0x21ff) return 2; if (ucs>=0x2200 && ucs<=0x22f1) return 1; if (ucs>=0x22f2 && ucs<=0x22f3) return 2; if (ucs==0x22f4) return 1; if (ucs>=0x22f5 && ucs<=0x22f6) return 2; if (ucs>=0x22f7 && ucs<=0x22f8) return 1; if (ucs>=0x22f9 && ucs<=0x22fb) return 2; if (ucs==0x22fc) return 1; if (ucs==0x22fd) return 2; if (ucs==0x22fe) return 1; if (ucs==0x22ff) return 2; if (ucs>=0x2300 && ucs<=0x2328) return 1; if (ucs>=0x2329 && ucs<=0x232a) return 2; if (ucs>=0x232b && ucs<=0x237a) return 1; if (ucs>=0x237b && ucs<=0x237e) return 2; if (ucs>=0x237f && ucs<=0x2380) return 1; if (ucs>=0x2381 && ucs<=0x2394) return 2; if (ucs>=0x2395 && ucs<=0x2396) return 1; if (ucs>=0x2397 && ucs<=0x239a) return 2; if (ucs>=0x239b && ucs<=0x23b1) return 1; if (ucs>=0x23b2 && ucs<=0x23b6) return 2; if (ucs>=0x23b7 && ucs<=0x23bf) return 1; if (ucs>=0x23c0 && ucs<=0x23ca) return 2; if (ucs>=0x23cb && ucs<=0x23cc) return 1; if (ucs>=0x23cd && ucs<=0x23ce) return 2; if (ucs>=0x23cf && ucs<=0x23d3) return 1; if (ucs>=0x23d4 && ucs<=0x23d9) return 2; if (ucs==0x23da) return 1; if (ucs>=0x23db && ucs<=0x23e7) return 2; if (ucs==0x23e8) return 1; if (ucs>=0x23e9 && ucs<=0x23fa) return 2; if (ucs>=0x23fb && ucs<=0x23ff) return -1; if (ucs>=0x2400 && ucs<=0x2421) return 2; if (ucs>=0x2422 && ucs<=0x2426) return 1; if (ucs>=0x2427 && ucs<=0x243f) return -1; if (ucs>=0x2440 && ucs<=0x244a) return 1; if (ucs>=0x244b && ucs<=0x245f) return -1; if (ucs>=0x2460 && ucs<=0x24e9) return 1; if (ucs==0x24ea) return 2; if (ucs>=0x24eb && ucs<=0x2602) return 1; if (ucs==0x2603) return 2; if (ucs>=0x2604 && ucs<=0x2615) return 1; if (ucs>=0x2616 && ucs<=0x2619) return 2; if (ucs>=0x261a && ucs<=0x2621) return 1; if (ucs>=0x2622 && ucs<=0x2624) return 2; if (ucs>=0x2625 && ucs<=0x262a) return 1; if (ucs>=0x262b && ucs<=0x262c) return 2; if (ucs>=0x262d && ucs<=0x262e) return 1; if (ucs>=0x262f && ucs<=0x2637) return 2; if (ucs>=0x2638 && ucs<=0x2671) return 1; if (ucs>=0x2672 && ucs<=0x268f) return 2; if (ucs>=0x2690 && ucs<=0x2691) return 1; if (ucs>=0x2692 && ucs<=0x269d) return 2; if (ucs>=0x269e && ucs<=0x269f) return 1; if (ucs==0x26a0) return 2; if (ucs==0x26a1) return 1; if (ucs>=0x26a2 && ucs<=0x26a7) return 2; if (ucs==0x26a8) return 1; if (ucs==0x26a9) return 2; if (ucs>=0x26aa && ucs<=0x26ac) return 1; if (ucs>=0x26ad && ucs<=0x26b1) return 2; if (ucs>=0x26b2 && ucs<=0x26b5) return 1; if (ucs==0x26b6) return 2; if (ucs>=0x26b7 && ucs<=0x26bc) return 1; if (ucs==0x26bd) return 2; if (ucs>=0x26be && ucs<=0x26bf) return 1; if (ucs>=0x26c0 && ucs<=0x26c3) return 2; if (ucs>=0x26c4 && ucs<=0x26cd) return 1; if (ucs==0x26ce) return 2; if (ucs>=0x26cf && ucs<=0x26e3) return 1; if (ucs>=0x26e4 && ucs<=0x26e7) return 2; if (ucs>=0x26e8 && ucs<=0x26ff) return 1; if (ucs>=0x2700 && ucs<=0x273c) return 2; if (ucs==0x273d) return 1; if (ucs>=0x273e && ucs<=0x2756) return 2; if (ucs==0x2757) return 1; if (ucs>=0x2758 && ucs<=0x2767) return 2; if (ucs>=0x2768 && ucs<=0x277f) return 1; if (ucs>=0x2780 && ucs<=0x27af) return 2; if (ucs==0x27b0) return 1; if (ucs>=0x27b1 && ucs<=0x27bf) return 2; if (ucs==0x27c0) return 1; if (ucs==0x27c1) return 2; if (ucs==0x27c2) return 1; if (ucs>=0x27c3 && ucs<=0x27c4) return 2; if (ucs>=0x27c5 && ucs<=0x27c7) return 1; if (ucs>=0x27c8 && ucs<=0x27c9) return 2; if (ucs==0x27ca) return 1; if (ucs>=0x27cb && ucs<=0x27d0) return 2; if (ucs==0x27d1) return 1; if (ucs==0x27d2) return 2; if (ucs>=0x27d3 && ucs<=0x27d4) return 1; if (ucs>=0x27d5 && ucs<=0x27df) return 2; if (ucs==0x27e0) return 1; if (ucs>=0x27e1 && ucs<=0x27e5) return 2; if (ucs>=0x27e6 && ucs<=0x27ef) return 1; if (ucs>=0x27f0 && ucs<=0x27ff) return 2; if (ucs>=0x2800 && ucs<=0x28ff) return 1; if (ucs>=0x2900 && ucs<=0x2907) return 2; if (ucs>=0x2908 && ucs<=0x2909) return 1; if (ucs>=0x290a && ucs<=0x2911) return 2; if (ucs>=0x2912 && ucs<=0x2913) return 1; if (ucs>=0x2914 && ucs<=0x2937) return 2; if (ucs>=0x2938 && ucs<=0x2939) return 1; if (ucs>=0x293a && ucs<=0x2948) return 2; if (ucs==0x2949) return 1; if (ucs>=0x294a && ucs<=0x294b) return 2; if (ucs>=0x294c && ucs<=0x294d) return 1; if (ucs==0x294e) return 2; if (ucs==0x294f) return 1; if (ucs==0x2950) return 2; if (ucs==0x2951) return 1; if (ucs>=0x2952 && ucs<=0x2953) return 2; if (ucs>=0x2954 && ucs<=0x2955) return 1; if (ucs>=0x2956 && ucs<=0x2957) return 2; if (ucs>=0x2958 && ucs<=0x2959) return 1; if (ucs>=0x295a && ucs<=0x295b) return 2; if (ucs>=0x295c && ucs<=0x295d) return 1; if (ucs>=0x295e && ucs<=0x295f) return 2; if (ucs>=0x2960 && ucs<=0x2961) return 1; if (ucs>=0x2962 && ucs<=0x297b) return 2; if (ucs>=0x297c && ucs<=0x297d) return 1; if (ucs>=0x297e && ucs<=0x297f) return 2; if (ucs==0x2980) return 1; if (ucs==0x2981) return 2; if (ucs>=0x2982 && ucs<=0x2992) return 1; if (ucs>=0x2993 && ucs<=0x2996) return 2; if (ucs>=0x2997 && ucs<=0x2999) return 1; if (ucs>=0x299a && ucs<=0x29a5) return 2; if (ucs>=0x29a6 && ucs<=0x29a7) return 1; if (ucs>=0x29a8 && ucs<=0x29d0) return 2; if (ucs>=0x29d1 && ucs<=0x29d9) return 1; if (ucs>=0x29da && ucs<=0x29ea) return 2; if (ucs==0x29eb) return 1; if (ucs>=0x29ec && ucs<=0x29f4) return 2; if (ucs>=0x29f5 && ucs<=0x29fd) return 1; if (ucs>=0x29fe && ucs<=0x2a1d) return 2; if (ucs>=0x2a1e && ucs<=0x2a1f) return 1; if (ucs==0x2a20) return 2; if (ucs>=0x2a21 && ucs<=0x2a26) return 1; if (ucs==0x2a27) return 2; if (ucs>=0x2a28 && ucs<=0x2a2c) return 1; if (ucs>=0x2a2d && ucs<=0x2a2e) return 2; if (ucs>=0x2a2f && ucs<=0x2a32) return 1; if (ucs>=0x2a33 && ucs<=0x2a3b) return 2; if (ucs>=0x2a3c && ucs<=0x2a3e) return 1; if (ucs>=0x2a3f && ucs<=0x2a45) return 2; if (ucs>=0x2a46 && ucs<=0x2a4b) return 1; if (ucs>=0x2a4c && ucs<=0x2a65) return 2; if (ucs>=0x2a66 && ucs<=0x2a67) return 1; if (ucs>=0x2a68 && ucs<=0x2a69) return 2; if (ucs>=0x2a6a && ucs<=0x2a6d) return 1; if (ucs==0x2a6e) return 2; if (ucs>=0x2a6f && ucs<=0x2a73) return 1; if (ucs>=0x2a74 && ucs<=0x2a76) return 2; if (ucs==0x2a77) return 1; if (ucs>=0x2a78 && ucs<=0x2a8a) return 2; if (ucs>=0x2a8b && ucs<=0x2a8c) return 1; if (ucs>=0x2a8d && ucs<=0x2a8e) return 2; if (ucs>=0x2a8f && ucs<=0x2a94) return 1; if (ucs>=0x2a95 && ucs<=0x2abe) return 2; if (ucs>=0x2abf && ucs<=0x2ac6) return 1; if (ucs>=0x2ac7 && ucs<=0x2ac8) return 2; if (ucs>=0x2ac9 && ucs<=0x2acc) return 1; if (ucs>=0x2acd && ucs<=0x2ad2) return 2; if (ucs>=0x2ad3 && ucs<=0x2ad6) return 1; if (ucs>=0x2ad7 && ucs<=0x2add) return 2; if (ucs==0x2ade) return 1; if (ucs>=0x2adf && ucs<=0x2aed) return 2; if (ucs>=0x2aee && ucs<=0x2af2) return 1; if (ucs>=0x2af3 && ucs<=0x2af5) return 2; if (ucs==0x2af6) return 1; if (ucs>=0x2af7 && ucs<=0x2afd) return 2; if (ucs>=0x2afe && ucs<=0x2aff) return 1; if (ucs>=0x2b00 && ucs<=0x2b05) return 2; if (ucs>=0x2b06 && ucs<=0x2b07) return 1; if (ucs>=0x2b08 && ucs<=0x2b0c) return 2; if (ucs==0x2b0d) return 1; if (ucs>=0x2b0e && ucs<=0x2b1c) return 2; if (ucs>=0x2b1d && ucs<=0x2b1e) return 1; if (ucs>=0x2b1f && ucs<=0x2b24) return 2; if (ucs>=0x2b25 && ucs<=0x2b2b) return 1; if (ucs>=0x2b2c && ucs<=0x2b2d) return 2; if (ucs>=0x2b2e && ucs<=0x2b2f) return 1; if (ucs>=0x2b30 && ucs<=0x2b4d) return 2; if (ucs>=0x2b4e && ucs<=0x2b4f) return 1; if (ucs>=0x2b50 && ucs<=0x2b54) return 2; if (ucs>=0x2b55 && ucs<=0x2b59) return 1; if (ucs>=0x2b5a && ucs<=0x2b73) return 2; if (ucs>=0x2b74 && ucs<=0x2b75) return -1; if (ucs>=0x2b76 && ucs<=0x2b95) return 2; if (ucs>=0x2b96 && ucs<=0x2b97) return -1; if (ucs>=0x2b98 && ucs<=0x2bb9) return 2; if (ucs>=0x2bba && ucs<=0x2bbc) return -1; if (ucs>=0x2bbd && ucs<=0x2bc8) return 2; if (ucs==0x2bc9) return -1; if (ucs>=0x2bca && ucs<=0x2bd1) return 2; if (ucs>=0x2bd2 && ucs<=0x2bff) return -1; if (ucs>=0x2c00 && ucs<=0x2c0e) return 1; if (ucs==0x2c0f) return 2; if (ucs>=0x2c10 && ucs<=0x2c1e) return 1; if (ucs==0x2c1f) return 2; if (ucs>=0x2c20 && ucs<=0x2c26) return 1; if (ucs>=0x2c27 && ucs<=0x2c29) return 2; if (ucs>=0x2c2a && ucs<=0x2c2e) return 1; if (ucs==0x2c2f) return -1; if (ucs>=0x2c30 && ucs<=0x2c3e) return 1; if (ucs==0x2c3f) return 2; if (ucs>=0x2c40 && ucs<=0x2c4e) return 1; if (ucs==0x2c4f) return 2; if (ucs>=0x2c50 && ucs<=0x2c56) return 1; if (ucs>=0x2c57 && ucs<=0x2c59) return 2; if (ucs>=0x2c5a && ucs<=0x2c5e) return 1; if (ucs==0x2c5f) return -1; if (ucs>=0x2c60 && ucs<=0x2ccd) return 1; if (ucs>=0x2cce && ucs<=0x2ccf) return 2; if (ucs>=0x2cd0 && ucs<=0x2ce6) return 1; if (ucs==0x2ce7) return 2; if (ucs>=0x2ce8 && ucs<=0x2ce9) return 1; if (ucs>=0x2cea && ucs<=0x2cee) return 2; if (ucs>=0x2cef && ucs<=0x2cf1) return 0; if (ucs>=0x2cf2 && ucs<=0x2cf3) return 1; if (ucs>=0x2cf4 && ucs<=0x2cf8) return -1; if (ucs>=0x2cf9 && ucs<=0x2d04) return 1; if (ucs==0x2d05) return 2; if (ucs==0x2d06) return 1; if (ucs==0x2d07) return 2; if (ucs>=0x2d08 && ucs<=0x2d09) return 1; if (ucs==0x2d0a) return 2; if (ucs>=0x2d0b && ucs<=0x2d0c) return 1; if (ucs==0x2d0d) return 2; if (ucs>=0x2d0e && ucs<=0x2d0f) return 1; if (ucs==0x2d10) return 2; if (ucs>=0x2d11 && ucs<=0x2d12) return 1; if (ucs>=0x2d13 && ucs<=0x2d14) return 2; if (ucs>=0x2d15 && ucs<=0x2d1a) return 1; if (ucs>=0x2d1b && ucs<=0x2d1c) return 2; if (ucs>=0x2d1d && ucs<=0x2d1f) return 1; if (ucs==0x2d20) return 2; if (ucs>=0x2d21 && ucs<=0x2d24) return 1; if (ucs==0x2d25) return 2; if (ucs==0x2d26) return -1; if (ucs==0x2d27) return 1; if (ucs>=0x2d28 && ucs<=0x2d2c) return -1; if (ucs==0x2d2d) return 1; if (ucs>=0x2d2e && ucs<=0x2d2f) return -1; if (ucs>=0x2d30 && ucs<=0x2d47) return 1; if (ucs==0x2d48) return 2; if (ucs>=0x2d49 && ucs<=0x2d67) return 1; if (ucs>=0x2d68 && ucs<=0x2d6e) return -1; if (ucs>=0x2d6f && ucs<=0x2d70) return 1; if (ucs>=0x2d71 && ucs<=0x2d7e) return -1; if (ucs>=0x2d7f && ucs<=0x2d96) return 2; if (ucs>=0x2d97 && ucs<=0x2d9f) return -1; if (ucs>=0x2da0 && ucs<=0x2da6) return 2; if (ucs==0x2da7) return -1; if (ucs>=0x2da8 && ucs<=0x2dae) return 2; if (ucs==0x2daf) return -1; if (ucs>=0x2db0 && ucs<=0x2db6) return 2; if (ucs==0x2db7) return -1; if (ucs>=0x2db8 && ucs<=0x2dbe) return 2; if (ucs==0x2dbf) return -1; if (ucs>=0x2dc0 && ucs<=0x2dc6) return 2; if (ucs==0x2dc7) return -1; if (ucs>=0x2dc8 && ucs<=0x2dce) return 2; if (ucs==0x2dcf) return -1; if (ucs>=0x2dd0 && ucs<=0x2dd6) return 2; if (ucs==0x2dd7) return -1; if (ucs>=0x2dd8 && ucs<=0x2dde) return 2; if (ucs==0x2ddf) return -1; if (ucs>=0x2de0 && ucs<=0x2dff) return 0; if (ucs>=0x2e00 && ucs<=0x2e0d) return 1; if (ucs>=0x2e0e && ucs<=0x2e11) return 2; if (ucs==0x2e12) return 1; if (ucs>=0x2e13 && ucs<=0x2e15) return 2; if (ucs>=0x2e16 && ucs<=0x2e42) return 1; if (ucs>=0x2e43 && ucs<=0x2e7f) return -1; if (ucs>=0x2e80 && ucs<=0x2e99) return 2; if (ucs==0x2e9a) return -1; if (ucs>=0x2e9b && ucs<=0x2ef3) return 2; if (ucs>=0x2ef4 && ucs<=0x2eff) return -1; if (ucs>=0x2f00 && ucs<=0x2fd5) return 2; if (ucs>=0x2fd6 && ucs<=0x2fef) return -1; if (ucs>=0x2ff0 && ucs<=0x2ffb) return 2; if (ucs>=0x2ffc && ucs<=0x2fff) return -1; if (ucs>=0x3000 && ucs<=0x303e) return 2; if (ucs==0x303f) return 1; if (ucs==0x3040) return -1; if (ucs>=0x3041 && ucs<=0x3096) return 2; if (ucs>=0x3097 && ucs<=0x3098) return -1; if (ucs>=0x3099 && ucs<=0x30ff) return 2; if (ucs>=0x3100 && ucs<=0x3104) return -1; if (ucs>=0x3105 && ucs<=0x312d) return 2; if (ucs>=0x312e && ucs<=0x3130) return -1; if (ucs>=0x3131 && ucs<=0x318e) return 2; if (ucs==0x318f) return -1; if (ucs>=0x3190 && ucs<=0x31ba) return 2; if (ucs>=0x31bb && ucs<=0x31bf) return -1; if (ucs>=0x31c0 && ucs<=0x31e3) return 2; if (ucs>=0x31e4 && ucs<=0x31ef) return -1; if (ucs>=0x31f0 && ucs<=0x321e) return 2; if (ucs==0x321f) return -1; if (ucs>=0x3220 && ucs<=0x3247) return 2; if (ucs>=0x3248 && ucs<=0x324f) return 1; if (ucs>=0x3250 && ucs<=0x32fe) return 2; if (ucs==0x32ff) return -1; if (ucs>=0x3300 && ucs<=0x4db5) return 2; if (ucs>=0x4db6 && ucs<=0x4dbf) return -1; if (ucs>=0x4dc0 && ucs<=0x9fcc) return 2; if (ucs>=0x9fcd && ucs<=0x9fff) return -1; if (ucs>=0xa000 && ucs<=0xa48c) return 2; if (ucs>=0xa48d && ucs<=0xa48f) return -1; if (ucs>=0xa490 && ucs<=0xa4c6) return 2; if (ucs>=0xa4c7 && ucs<=0xa4cf) return -1; if (ucs>=0xa4d0 && ucs<=0xa4ff) return 1; if (ucs>=0xa500 && ucs<=0xa62b) return 2; if (ucs>=0xa62c && ucs<=0xa63f) return -1; if (ucs>=0xa640 && ucs<=0xa64b) return 1; if (ucs>=0xa64c && ucs<=0xa64d) return 2; if (ucs>=0xa64e && ucs<=0xa64f) return 1; if (ucs>=0xa650 && ucs<=0xa651) return 2; if (ucs>=0xa652 && ucs<=0xa65d) return 1; if (ucs==0xa65e) return 2; if (ucs==0xa65f) return 1; if (ucs>=0xa660 && ucs<=0xa667) return 2; if (ucs>=0xa668 && ucs<=0xa66b) return 1; if (ucs>=0xa66c && ucs<=0xa66e) return 2; if (ucs>=0xa66f && ucs<=0xa672) return 0; if (ucs==0xa673) return 1; if (ucs>=0xa674 && ucs<=0xa67d) return 0; if (ucs>=0xa67e && ucs<=0xa683) return 1; if (ucs>=0xa684 && ucs<=0xa685) return 2; if (ucs>=0xa686 && ucs<=0xa691) return 1; if (ucs>=0xa692 && ucs<=0xa693) return 2; if (ucs>=0xa694 && ucs<=0xa697) return 1; if (ucs>=0xa698 && ucs<=0xa699) return 2; if (ucs>=0xa69a && ucs<=0xa69d) return 1; if (ucs==0xa69e) return -1; if (ucs==0xa69f) return 0; if (ucs>=0xa6a0 && ucs<=0xa6ef) return 1; if (ucs>=0xa6f0 && ucs<=0xa6f1) return 0; if (ucs>=0xa6f2 && ucs<=0xa6f7) return 1; if (ucs>=0xa6f8 && ucs<=0xa6ff) return -1; if (ucs>=0xa700 && ucs<=0xa727) return 1; if (ucs>=0xa728 && ucs<=0xa729) return 2; if (ucs>=0xa72a && ucs<=0xa731) return 1; if (ucs>=0xa732 && ucs<=0xa73d) return 2; if (ucs>=0xa73e && ucs<=0xa74d) return 1; if (ucs>=0xa74e && ucs<=0xa74f) return 2; if (ucs>=0xa750 && ucs<=0xa757) return 1; if (ucs>=0xa758 && ucs<=0xa759) return 2; if (ucs>=0xa75a && ucs<=0xa770) return 1; if (ucs>=0xa771 && ucs<=0xa777) return 2; if (ucs>=0xa778 && ucs<=0xa78e) return 1; if (ucs==0xa78f) return -1; if (ucs>=0xa790 && ucs<=0xa7ad) return 1; if (ucs>=0xa7ae && ucs<=0xa7af) return -1; if (ucs>=0xa7b0 && ucs<=0xa7b1) return 1; if (ucs>=0xa7b2 && ucs<=0xa7f6) return -1; if (ucs>=0xa7f7 && ucs<=0xa7fe) return 1; if (ucs>=0xa7ff && ucs<=0xa801) return 2; if (ucs==0xa802) return 0; if (ucs>=0xa803 && ucs<=0xa805) return 2; if (ucs==0xa806) return 0; if (ucs>=0xa807 && ucs<=0xa80a) return 2; if (ucs==0xa80b) return 0; if (ucs>=0xa80c && ucs<=0xa822) return 2; if (ucs>=0xa823 && ucs<=0xa827) return 0; if (ucs>=0xa828 && ucs<=0xa829) return 1; if (ucs>=0xa82a && ucs<=0xa82b) return 2; if (ucs>=0xa82c && ucs<=0xa82f) return -1; if (ucs>=0xa830 && ucs<=0xa839) return 2; if (ucs>=0xa83a && ucs<=0xa83f) return -1; if (ucs>=0xa840 && ucs<=0xa877) return 2; if (ucs>=0xa878 && ucs<=0xa87f) return -1; if (ucs>=0xa880 && ucs<=0xa881) return 0; if (ucs>=0xa882 && ucs<=0xa8b3) return 2; if (ucs>=0xa8b4 && ucs<=0xa8c4) return 0; if (ucs>=0xa8c5 && ucs<=0xa8cd) return -1; if (ucs>=0xa8ce && ucs<=0xa8d9) return 2; if (ucs>=0xa8da && ucs<=0xa8df) return -1; if (ucs>=0xa8e0 && ucs<=0xa8f1) return 0; if (ucs>=0xa8f2 && ucs<=0xa8fb) return 2; if (ucs>=0xa8fc && ucs<=0xa8ff) return -1; if (ucs>=0xa900 && ucs<=0xa925) return 2; if (ucs>=0xa926 && ucs<=0xa92d) return 0; if (ucs>=0xa92e && ucs<=0xa946) return 2; if (ucs>=0xa947 && ucs<=0xa953) return 0; if (ucs>=0xa954 && ucs<=0xa95e) return -1; if (ucs>=0xa95f && ucs<=0xa97c) return 2; if (ucs>=0xa97d && ucs<=0xa97f) return -1; if (ucs>=0xa980 && ucs<=0xa983) return 0; if (ucs>=0xa984 && ucs<=0xa9b2) return 2; if (ucs>=0xa9b3 && ucs<=0xa9c0) return 0; if (ucs>=0xa9c1 && ucs<=0xa9cd) return 2; if (ucs==0xa9ce) return -1; if (ucs>=0xa9cf && ucs<=0xa9d9) return 2; if (ucs>=0xa9da && ucs<=0xa9dd) return -1; if (ucs>=0xa9de && ucs<=0xa9df) return 2; if (ucs==0xa9e0) return 1; if (ucs>=0xa9e1 && ucs<=0xa9e4) return 2; if (ucs==0xa9e5) return 0; if (ucs==0xa9e6) return 1; if (ucs>=0xa9e7 && ucs<=0xa9ee) return 2; if (ucs>=0xa9ef && ucs<=0xa9f8) return 1; if (ucs>=0xa9f9 && ucs<=0xa9fc) return 2; if (ucs==0xa9fd) return 1; if (ucs==0xa9fe) return 2; if (ucs==0xa9ff) return -1; if (ucs>=0xaa00 && ucs<=0xaa28) return 2; if (ucs>=0xaa29 && ucs<=0xaa36) return 0; if (ucs>=0xaa37 && ucs<=0xaa3f) return -1; if (ucs>=0xaa40 && ucs<=0xaa42) return 2; if (ucs==0xaa43) return 0; if (ucs>=0xaa44 && ucs<=0xaa4b) return 2; if (ucs>=0xaa4c && ucs<=0xaa4d) return 0; if (ucs>=0xaa4e && ucs<=0xaa4f) return -1; if (ucs>=0xaa50 && ucs<=0xaa59) return 2; if (ucs>=0xaa5a && ucs<=0xaa5b) return -1; if (ucs>=0xaa5c && ucs<=0xaa7a) return 2; if (ucs>=0xaa7b && ucs<=0xaa7d) return 0; if (ucs>=0xaa7e && ucs<=0xaaaf) return 2; if (ucs==0xaab0) return 0; if (ucs==0xaab1) return 2; if (ucs>=0xaab2 && ucs<=0xaab4) return 0; if (ucs>=0xaab5 && ucs<=0xaab6) return 2; if (ucs>=0xaab7 && ucs<=0xaab8) return 0; if (ucs>=0xaab9 && ucs<=0xaabd) return 2; if (ucs>=0xaabe && ucs<=0xaabf) return 0; if (ucs==0xaac0) return 2; if (ucs==0xaac1) return 0; if (ucs==0xaac2) return 2; if (ucs>=0xaac3 && ucs<=0xaada) return -1; if (ucs>=0xaadb && ucs<=0xaaea) return 2; if (ucs>=0xaaeb && ucs<=0xaaed) return 0; if (ucs==0xaaee) return 2; if (ucs==0xaaef) return 0; if (ucs>=0xaaf0 && ucs<=0xaaf4) return 2; if (ucs>=0xaaf5 && ucs<=0xaaf6) return 0; if (ucs>=0xaaf7 && ucs<=0xab00) return -1; if (ucs>=0xab01 && ucs<=0xab06) return 2; if (ucs>=0xab07 && ucs<=0xab08) return -1; if (ucs>=0xab09 && ucs<=0xab0e) return 2; if (ucs>=0xab0f && ucs<=0xab10) return -1; if (ucs>=0xab11 && ucs<=0xab16) return 2; if (ucs>=0xab17 && ucs<=0xab1f) return -1; if (ucs>=0xab20 && ucs<=0xab26) return 2; if (ucs==0xab27) return -1; if (ucs>=0xab28 && ucs<=0xab2e) return 2; if (ucs==0xab2f) return -1; if (ucs>=0xab30 && ucs<=0xab5f) return 1; if (ucs>=0xab60 && ucs<=0xab63) return -1; if (ucs>=0xab64 && ucs<=0xab65) return 1; if (ucs>=0xab66 && ucs<=0xabbf) return -1; if (ucs>=0xabc0 && ucs<=0xabe2) return 2; if (ucs>=0xabe3 && ucs<=0xabea) return 0; if (ucs==0xabeb) return 2; if (ucs>=0xabec && ucs<=0xabed) return 0; if (ucs>=0xabee && ucs<=0xabef) return -1; if (ucs>=0xabf0 && ucs<=0xabf9) return 2; if (ucs>=0xabfa && ucs<=0xabff) return -1; if (ucs>=0xac00 && ucs<=0xd7a3) return 2; if (ucs>=0xd7a4 && ucs<=0xd7af) return -1; if (ucs>=0xd7b0 && ucs<=0xd7c6) return 2; if (ucs>=0xd7c7 && ucs<=0xd7ca) return -1; if (ucs>=0xd7cb && ucs<=0xd7fb) return 2; if (ucs>=0xd7fc && ucs<=0xdfff) return -1; if (ucs>=0xe000 && ucs<=0xf8ff) return 1; if (ucs>=0xf900 && ucs<=0xfa6d) return 2; if (ucs>=0xfa6e && ucs<=0xfa6f) return -1; if (ucs>=0xfa70 && ucs<=0xfad9) return 2; if (ucs>=0xfada && ucs<=0xfaff) return -1; if (ucs>=0xfb00 && ucs<=0xfb06) return 1; if (ucs>=0xfb07 && ucs<=0xfb12) return -1; if (ucs>=0xfb13 && ucs<=0xfb17) return 1; if (ucs>=0xfb18 && ucs<=0xfb1c) return -1; if (ucs==0xfb1d) return 1; if (ucs==0xfb1e) return 0; if (ucs>=0xfb1f && ucs<=0xfb20) return 1; if (ucs>=0xfb21 && ucs<=0xfb28) return 2; if (ucs>=0xfb29 && ucs<=0xfb36) return 1; if (ucs==0xfb37) return -1; if (ucs>=0xfb38 && ucs<=0xfb3c) return 1; if (ucs==0xfb3d) return -1; if (ucs==0xfb3e) return 1; if (ucs==0xfb3f) return -1; if (ucs>=0xfb40 && ucs<=0xfb41) return 1; if (ucs==0xfb42) return -1; if (ucs>=0xfb43 && ucs<=0xfb44) return 1; if (ucs==0xfb45) return -1; if (ucs>=0xfb46 && ucs<=0xfbc1) return 1; if (ucs>=0xfbc2 && ucs<=0xfbd2) return -1; if (ucs>=0xfbd3 && ucs<=0xfc1e) return 1; if (ucs==0xfc1f) return 2; if (ucs==0xfc20) return 1; if (ucs==0xfc21) return 2; if (ucs>=0xfc22 && ucs<=0xfc24) return 1; if (ucs==0xfc25) return 2; if (ucs>=0xfc26 && ucs<=0xfc3c) return 1; if (ucs>=0xfc3d && ucs<=0xfc3e) return 2; if (ucs>=0xfc3f && ucs<=0xfcac) return 1; if (ucs>=0xfcad && ucs<=0xfcaf) return 2; if (ucs==0xfcb0) return 1; if (ucs>=0xfcb1 && ucs<=0xfcb7) return 2; if (ucs>=0xfcb8 && ucs<=0xfce6) return 1; if (ucs>=0xfce7 && ucs<=0xfcea) return 2; if (ucs>=0xfceb && ucs<=0xfcfa) return 1; if (ucs>=0xfcfb && ucs<=0xfcfe) return 2; if (ucs>=0xfcff && ucs<=0xfd16) return 1; if (ucs>=0xfd17 && ucs<=0xfd1a) return 2; if (ucs>=0xfd1b && ucs<=0xfd2c) return 1; if (ucs>=0xfd2d && ucs<=0xfd32) return 2; if (ucs==0xfd33) return 1; if (ucs>=0xfd34 && ucs<=0xfd39) return 2; if (ucs>=0xfd3a && ucs<=0xfd3d) return 1; if (ucs>=0xfd3e && ucs<=0xfd3f) return 2; if (ucs>=0xfd40 && ucs<=0xfd4f) return -1; if (ucs>=0xfd50 && ucs<=0xfd8f) return 2; if (ucs>=0xfd90 && ucs<=0xfd91) return -1; if (ucs>=0xfd92 && ucs<=0xfdc7) return 2; if (ucs>=0xfdc8 && ucs<=0xfdef) return -1; if (ucs>=0xfdf0 && ucs<=0xfdfd) return 2; if (ucs>=0xfdfe && ucs<=0xfdff) return -1; if (ucs>=0xfe00 && ucs<=0xfe0f) return 1; if (ucs>=0xfe10 && ucs<=0xfe19) return 2; if (ucs>=0xfe1a && ucs<=0xfe1f) return -1; if (ucs>=0xfe20 && ucs<=0xfe2d) return 0; if (ucs>=0xfe2e && ucs<=0xfe2f) return -1; if (ucs>=0xfe30 && ucs<=0xfe52) return 2; if (ucs==0xfe53) return -1; if (ucs>=0xfe54 && ucs<=0xfe66) return 2; if (ucs==0xfe67) return -1; if (ucs>=0xfe68 && ucs<=0xfe6b) return 2; if (ucs>=0xfe6c && ucs<=0xfe6f) return -1; if (ucs>=0xfe70 && ucs<=0xfe74) return 1; if (ucs==0xfe75) return -1; if (ucs>=0xfe76 && ucs<=0xfefc) return 1; if (ucs>=0xfefd && ucs<=0xfefe) return -1; if (ucs==0xfeff) return 0; if (ucs==0xff00) return -1; if (ucs>=0xff01 && ucs<=0xff60) return 2; if (ucs>=0xff61 && ucs<=0xffbe) return 1; if (ucs>=0xffbf && ucs<=0xffc1) return -1; if (ucs>=0xffc2 && ucs<=0xffc7) return 1; if (ucs>=0xffc8 && ucs<=0xffc9) return -1; if (ucs>=0xffca && ucs<=0xffcf) return 1; if (ucs>=0xffd0 && ucs<=0xffd1) return -1; if (ucs>=0xffd2 && ucs<=0xffd7) return 1; if (ucs>=0xffd8 && ucs<=0xffd9) return -1; if (ucs>=0xffda && ucs<=0xffdc) return 1; if (ucs>=0xffdd && ucs<=0xffdf) return -1; if (ucs>=0xffe0 && ucs<=0xffe6) return 2; if (ucs==0xffe7) return -1; if (ucs>=0xffe8 && ucs<=0xffee) return 1; if (ucs>=0xffef && ucs<=0xfff8) return -1; if (ucs>=0xfff9 && ucs<=0xfffb) return 0; if (ucs==0xfffc) return 2; if (ucs==0xfffd) return 1; if (ucs>=0xfffe && ucs<=0xffff) return -1; if (ucs>=0x10000 && ucs<=0x1000b) return 1; if (ucs==0x1000c) return -1; if (ucs==0x1000d) return 1; if (ucs>=0x1000e && ucs<=0x1000f) return 2; if (ucs>=0x10010 && ucs<=0x10012) return 1; if (ucs==0x10013) return 2; if (ucs>=0x10014 && ucs<=0x1001b) return 1; if (ucs==0x1001c) return 2; if (ucs>=0x1001d && ucs<=0x10021) return 1; if (ucs>=0x10022 && ucs<=0x10024) return 2; if (ucs>=0x10025 && ucs<=0x10026) return 1; if (ucs==0x10027) return -1; if (ucs>=0x10028 && ucs<=0x10035) return 1; if (ucs==0x10036) return 2; if (ucs>=0x10037 && ucs<=0x1003a) return 1; if (ucs==0x1003b) return -1; if (ucs>=0x1003c && ucs<=0x1003d) return 1; if (ucs==0x1003e) return -1; if (ucs>=0x1003f && ucs<=0x10040) return 1; if (ucs==0x10041) return 2; if (ucs>=0x10042 && ucs<=0x10043) return 1; if (ucs>=0x10044 && ucs<=0x10046) return 2; if (ucs>=0x10047 && ucs<=0x10049) return 1; if (ucs>=0x1004a && ucs<=0x1004b) return 2; if (ucs==0x1004c) return 1; if (ucs==0x1004d) return 2; if (ucs>=0x1004e && ucs<=0x1004f) return -1; if (ucs>=0x10050 && ucs<=0x10051) return 1; if (ucs==0x10052) return 2; if (ucs>=0x10053 && ucs<=0x10054) return 1; if (ucs==0x10055) return 2; if (ucs==0x10056) return 1; if (ucs>=0x10057 && ucs<=0x10059) return 2; if (ucs==0x1005a) return 1; if (ucs>=0x1005b && ucs<=0x1005d) return 2; if (ucs>=0x1005e && ucs<=0x1007f) return -1; if (ucs>=0x10080 && ucs<=0x10081) return 1; if (ucs>=0x10082 && ucs<=0x10085) return 2; if (ucs>=0x10086 && ucs<=0x10089) return 1; if (ucs>=0x1008a && ucs<=0x1008e) return 2; if (ucs==0x1008f) return 1; if (ucs==0x10090) return 2; if (ucs>=0x10091 && ucs<=0x10094) return 1; if (ucs>=0x10095 && ucs<=0x10099) return 2; if (ucs==0x1009a) return 1; if (ucs>=0x1009b && ucs<=0x100a6) return 2; if (ucs==0x100a7) return 1; if (ucs>=0x100a8 && ucs<=0x100b2) return 2; if (ucs==0x100b3) return 1; if (ucs==0x100b4) return 2; if (ucs==0x100b5) return 1; if (ucs>=0x100b6 && ucs<=0x100ba) return 2; if (ucs>=0x100bb && ucs<=0x100bc) return 1; if (ucs>=0x100bd && ucs<=0x100c2) return 2; if (ucs==0x100c3) return 1; if (ucs>=0x100c4 && ucs<=0x100c8) return 2; if (ucs>=0x100c9 && ucs<=0x100cb) return 1; if (ucs>=0x100cc && ucs<=0x100ee) return 2; if (ucs==0x100ef) return 1; if (ucs>=0x100f0 && ucs<=0x100fa) return 2; if (ucs>=0x100fb && ucs<=0x100ff) return -1; if (ucs>=0x10100 && ucs<=0x10102) return 1; if (ucs>=0x10103 && ucs<=0x10106) return -1; if (ucs>=0x10107 && ucs<=0x10120) return 1; if (ucs==0x10121) return 2; if (ucs==0x10122) return 1; if (ucs==0x10123) return 2; if (ucs==0x10124) return 1; if (ucs>=0x10125 && ucs<=0x1012a) return 2; if (ucs==0x1012b) return 1; if (ucs==0x1012c) return 2; if (ucs==0x1012d) return 1; if (ucs>=0x1012e && ucs<=0x10133) return 2; if (ucs>=0x10134 && ucs<=0x10136) return -1; if (ucs==0x10137) return 2; if (ucs==0x10138) return 1; if (ucs==0x10139) return 2; if (ucs>=0x1013a && ucs<=0x1013e) return 1; if (ucs==0x1013f) return 2; if (ucs>=0x10140 && ucs<=0x10168) return 1; if (ucs>=0x10169 && ucs<=0x1016e) return 2; if (ucs==0x1016f) return 1; if (ucs==0x10170) return 2; if (ucs>=0x10171 && ucs<=0x10176) return 1; if (ucs==0x10177) return 2; if (ucs>=0x10178 && ucs<=0x10187) return 1; if (ucs==0x10188) return 2; if (ucs>=0x10189 && ucs<=0x1018c) return 1; if (ucs>=0x1018d && ucs<=0x1018f) return -1; if (ucs>=0x10190 && ucs<=0x10196) return 1; if (ucs>=0x10197 && ucs<=0x10199) return 2; if (ucs>=0x1019a && ucs<=0x1019b) return 1; if (ucs>=0x1019c && ucs<=0x1019f) return -1; if (ucs==0x101a0) return 1; if (ucs>=0x101a1 && ucs<=0x101cf) return -1; if (ucs>=0x101d0 && ucs<=0x101fc) return 2; if (ucs==0x101fd) return 0; if (ucs>=0x101fe && ucs<=0x1027f) return -1; if (ucs>=0x10280 && ucs<=0x1028d) return 1; if (ucs>=0x1028e && ucs<=0x1028f) return 2; if (ucs>=0x10290 && ucs<=0x10297) return 1; if (ucs==0x10298) return 2; if (ucs==0x10299) return 1; if (ucs==0x1029a) return 2; if (ucs>=0x1029b && ucs<=0x1029c) return 1; if (ucs>=0x1029d && ucs<=0x1029f) return -1; if (ucs>=0x102a0 && ucs<=0x102af) return 1; if (ucs==0x102b0) return 2; if (ucs>=0x102b1 && ucs<=0x102b6) return 1; if (ucs==0x102b7) return 2; if (ucs>=0x102b8 && ucs<=0x102d0) return 1; if (ucs>=0x102d1 && ucs<=0x102df) return -1; if (ucs==0x102e0) return 0; if (ucs>=0x102e1 && ucs<=0x102fb) return 1; if (ucs>=0x102fc && ucs<=0x102ff) return -1; if (ucs>=0x10300 && ucs<=0x1031e) return 1; if (ucs==0x1031f) return -1; if (ucs>=0x10320 && ucs<=0x10323) return 1; if (ucs>=0x10324 && ucs<=0x1032f) return -1; if (ucs>=0x10330 && ucs<=0x1034a) return 1; if (ucs>=0x1034b && ucs<=0x1037f) return -1; if (ucs>=0x10380 && ucs<=0x1039d) return 2; if (ucs==0x1039e) return -1; if (ucs>=0x1039f && ucs<=0x103c3) return 2; if (ucs>=0x103c4 && ucs<=0x103c7) return -1; if (ucs>=0x103c8 && ucs<=0x103d5) return 2; if (ucs>=0x103d6 && ucs<=0x103ff) return -1; if (ucs>=0x10400 && ucs<=0x10483) return 1; if (ucs==0x10484) return 2; if (ucs>=0x10485 && ucs<=0x1048d) return 1; if (ucs==0x1048e) return 2; if (ucs==0x1048f) return 1; if (ucs==0x10490) return 2; if (ucs>=0x10491 && ucs<=0x10492) return 1; if (ucs==0x10493) return 2; if (ucs>=0x10494 && ucs<=0x1049c) return 1; if (ucs==0x1049d) return 2; if (ucs>=0x1049e && ucs<=0x1049f) return -1; if (ucs>=0x104a0 && ucs<=0x104a9) return 1; if (ucs>=0x104aa && ucs<=0x107ff) return -1; if (ucs>=0x10800 && ucs<=0x10802) return 2; if (ucs==0x10803) return 1; if (ucs==0x10804) return 2; if (ucs==0x10805) return 1; if (ucs>=0x10806 && ucs<=0x10807) return -1; if (ucs==0x10808) return 2; if (ucs==0x10809) return -1; if (ucs==0x1080a) return 1; if (ucs>=0x1080b && ucs<=0x1080f) return 2; if (ucs==0x10810) return 1; if (ucs==0x10811) return 2; if (ucs==0x10812) return 1; if (ucs>=0x10813 && ucs<=0x10818) return 2; if (ucs==0x10819) return 1; if (ucs>=0x1081a && ucs<=0x1081d) return 2; if (ucs==0x1081e) return 1; if (ucs==0x1081f) return 2; if (ucs==0x10820) return 1; if (ucs>=0x10821 && ucs<=0x10822) return 2; if (ucs>=0x10823 && ucs<=0x10824) return 1; if (ucs==0x10825) return 2; if (ucs==0x10826) return 1; if (ucs==0x10827) return 2; if (ucs>=0x10828 && ucs<=0x1082b) return 1; if (ucs==0x1082c) return 2; if (ucs>=0x1082d && ucs<=0x10831) return 1; if (ucs==0x10832) return 2; if (ucs==0x10833) return 1; if (ucs==0x10834) return 2; if (ucs==0x10835) return 1; if (ucs==0x10836) return -1; if (ucs==0x10837) return 2; if (ucs==0x10838) return 1; if (ucs>=0x10839 && ucs<=0x1083b) return -1; if (ucs==0x1083c) return 2; if (ucs>=0x1083d && ucs<=0x1083e) return -1; if (ucs==0x1083f) return 2; if (ucs>=0x10840 && ucs<=0x10855) return 1; if (ucs==0x10856) return -1; if (ucs>=0x10857 && ucs<=0x1085f) return 1; if (ucs>=0x10860 && ucs<=0x108ff) return -1; if (ucs>=0x10900 && ucs<=0x1091b) return 1; if (ucs>=0x1091c && ucs<=0x1091e) return -1; if (ucs>=0x1091f && ucs<=0x10939) return 1; if (ucs>=0x1093a && ucs<=0x1093e) return -1; if (ucs==0x1093f) return 1; if (ucs>=0x10940 && ucs<=0x1097f) return -1; if (ucs==0x10980) return 2; if (ucs==0x10981) return 1; if (ucs>=0x10982 && ucs<=0x10986) return 2; if (ucs==0x10987) return 1; if (ucs>=0x10988 && ucs<=0x10996) return 2; if (ucs==0x10997) return 1; if (ucs>=0x10998 && ucs<=0x1099d) return 2; if (ucs==0x1099e) return 1; if (ucs>=0x1099f && ucs<=0x109a0) return 2; if (ucs==0x109a1) return 1; if (ucs==0x109a2) return 2; if (ucs==0x109a3) return 1; if (ucs==0x109a4) return 2; if (ucs>=0x109a5 && ucs<=0x109a8) return 1; if (ucs==0x109a9) return 2; if (ucs==0x109aa) return 1; if (ucs==0x109ab) return 2; if (ucs==0x109ac) return 1; if (ucs==0x109ad) return 2; if (ucs>=0x109ae && ucs<=0x109b0) return 1; if (ucs==0x109b1) return 2; if (ucs==0x109b2) return 1; if (ucs==0x109b3) return 2; if (ucs==0x109b4) return 1; if (ucs>=0x109b5 && ucs<=0x109b6) return 2; if (ucs==0x109b7) return 1; if (ucs>=0x109b8 && ucs<=0x109bd) return -1; if (ucs==0x109be) return 1; if (ucs==0x109bf) return 2; if (ucs>=0x109c0 && ucs<=0x109ff) return -1; if (ucs==0x10a00) return 2; if (ucs>=0x10a01 && ucs<=0x10a03) return 0; if (ucs==0x10a04) return -1; if (ucs>=0x10a05 && ucs<=0x10a06) return 0; if (ucs>=0x10a07 && ucs<=0x10a0b) return -1; if (ucs>=0x10a0c && ucs<=0x10a0f) return 0; if (ucs>=0x10a10 && ucs<=0x10a13) return 2; if (ucs==0x10a14) return -1; if (ucs>=0x10a15 && ucs<=0x10a17) return 2; if (ucs==0x10a18) return -1; if (ucs>=0x10a19 && ucs<=0x10a33) return 2; if (ucs>=0x10a34 && ucs<=0x10a37) return -1; if (ucs>=0x10a38 && ucs<=0x10a3a) return 0; if (ucs>=0x10a3b && ucs<=0x10a3e) return -1; if (ucs==0x10a3f) return 0; if (ucs>=0x10a40 && ucs<=0x10a47) return 2; if (ucs>=0x10a48 && ucs<=0x10a4f) return -1; if (ucs>=0x10a50 && ucs<=0x10a58) return 2; if (ucs>=0x10a59 && ucs<=0x10a5f) return -1; if (ucs>=0x10a60 && ucs<=0x10a9f) return 1; if (ucs>=0x10aa0 && ucs<=0x10aff) return -1; if (ucs==0x10b00) return 1; if (ucs>=0x10b01 && ucs<=0x10b04) return 2; if (ucs>=0x10b05 && ucs<=0x10b07) return 1; if (ucs>=0x10b08 && ucs<=0x10b0b) return 2; if (ucs>=0x10b0c && ucs<=0x10b10) return 1; if (ucs>=0x10b11 && ucs<=0x10b14) return 2; if (ucs==0x10b15) return 1; if (ucs==0x10b16) return 2; if (ucs>=0x10b17 && ucs<=0x10b1a) return 1; if (ucs==0x10b1b) return 2; if (ucs>=0x10b1c && ucs<=0x10b1f) return 1; if (ucs>=0x10b20 && ucs<=0x10b21) return 2; if (ucs>=0x10b22 && ucs<=0x10b26) return 1; if (ucs==0x10b27) return 2; if (ucs>=0x10b28 && ucs<=0x10b29) return 1; if (ucs>=0x10b2a && ucs<=0x10b2b) return 2; if (ucs>=0x10b2c && ucs<=0x10b30) return 1; if (ucs>=0x10b31 && ucs<=0x10b35) return 2; if (ucs>=0x10b36 && ucs<=0x10b38) return -1; if (ucs>=0x10b39 && ucs<=0x10b3f) return 1; if (ucs>=0x10b40 && ucs<=0x10b41) return 2; if (ucs>=0x10b42 && ucs<=0x10b43) return 1; if (ucs==0x10b44) return 2; if (ucs>=0x10b45 && ucs<=0x10b47) return 1; if (ucs==0x10b48) return 2; if (ucs==0x10b49) return 1; if (ucs==0x10b4a) return 2; if (ucs==0x10b4b) return 1; if (ucs>=0x10b4c && ucs<=0x10b4d) return 2; if (ucs>=0x10b4e && ucs<=0x10b4f) return 1; if (ucs>=0x10b50 && ucs<=0x10b51) return 2; if (ucs>=0x10b52 && ucs<=0x10b55) return 1; if (ucs>=0x10b56 && ucs<=0x10b57) return -1; if (ucs>=0x10b58 && ucs<=0x10b5d) return 1; if (ucs==0x10b5e) return 2; if (ucs>=0x10b5f && ucs<=0x10b63) return 1; if (ucs==0x10b64) return 2; if (ucs>=0x10b65 && ucs<=0x10b66) return 1; if (ucs==0x10b67) return 2; if (ucs>=0x10b68 && ucs<=0x10b6b) return 1; if (ucs==0x10b6c) return 2; if (ucs==0x10b6d) return 1; if (ucs==0x10b6e) return 2; if (ucs>=0x10b6f && ucs<=0x10b70) return 1; if (ucs==0x10b71) return 2; if (ucs==0x10b72) return 1; if (ucs>=0x10b73 && ucs<=0x10b77) return -1; if (ucs>=0x10b78 && ucs<=0x10b80) return 1; if (ucs==0x10b81) return 2; if (ucs==0x10b82) return 1; if (ucs==0x10b83) return 2; if (ucs>=0x10b84 && ucs<=0x10b86) return 1; if (ucs==0x10b87) return 2; if (ucs==0x10b88) return 1; if (ucs==0x10b89) return 2; if (ucs>=0x10b8a && ucs<=0x10b8c) return 1; if (ucs==0x10b8d) return 2; if (ucs>=0x10b8e && ucs<=0x10b8f) return 1; if (ucs==0x10b90) return 2; if (ucs==0x10b91) return 1; if (ucs>=0x10b92 && ucs<=0x10b98) return -1; if (ucs>=0x10b99 && ucs<=0x10b9c) return 2; if (ucs>=0x10b9d && ucs<=0x10ba8) return -1; if (ucs>=0x10ba9 && ucs<=0x10bab) return 1; if (ucs==0x10bac) return 2; if (ucs>=0x10bad && ucs<=0x10bae) return 1; if (ucs==0x10baf) return 2; if (ucs>=0x10bb0 && ucs<=0x10bff) return -1; if (ucs>=0x10c00 && ucs<=0x10c48) return 1; if (ucs>=0x10c49 && ucs<=0x10e5f) return -1; if (ucs>=0x10e60 && ucs<=0x10e61) return 1; if (ucs==0x10e62) return 2; if (ucs>=0x10e63 && ucs<=0x10e67) return 1; if (ucs==0x10e68) return 2; if (ucs>=0x10e69 && ucs<=0x10e6a) return 1; if (ucs>=0x10e6b && ucs<=0x10e6d) return 2; if (ucs>=0x10e6e && ucs<=0x10e6f) return 1; if (ucs==0x10e70) return 2; if (ucs>=0x10e71 && ucs<=0x10e73) return 1; if (ucs>=0x10e74 && ucs<=0x10e75) return 2; if (ucs==0x10e76) return 1; if (ucs>=0x10e77 && ucs<=0x10e78) return 2; if (ucs>=0x10e79 && ucs<=0x10e7a) return 1; if (ucs>=0x10e7b && ucs<=0x10e7e) return 2; if (ucs>=0x10e7f && ucs<=0x10fff) return -1; if (ucs>=0x11000 && ucs<=0x11002) return 0; if (ucs>=0x11003 && ucs<=0x11037) return 2; if (ucs>=0x11038 && ucs<=0x11046) return 0; if (ucs>=0x11047 && ucs<=0x1104d) return 2; if (ucs>=0x1104e && ucs<=0x11051) return -1; if (ucs>=0x11052 && ucs<=0x1106f) return 2; if (ucs>=0x11070 && ucs<=0x1107e) return -1; if (ucs==0x1107f) return 2; if (ucs>=0x11080 && ucs<=0x11082) return 0; if (ucs>=0x11083 && ucs<=0x110af) return 2; if (ucs>=0x110b0 && ucs<=0x110ba) return 0; if (ucs>=0x110bb && ucs<=0x110bc) return 2; if (ucs==0x110bd) return 0; if (ucs>=0x110be && ucs<=0x110c1) return 2; if (ucs>=0x110c2 && ucs<=0x11121) return -1; if (ucs==0x11122) return 2; if (ucs>=0x11123 && ucs<=0x16aff) return -1; if (ucs>=0x16b00 && ucs<=0x16b2f) return 1; if (ucs>=0x16b30 && ucs<=0x16b36) return 0; if (ucs>=0x16b37 && ucs<=0x16b45) return 1; if (ucs>=0x16b46 && ucs<=0x16b4f) return -1; if (ucs>=0x16b50 && ucs<=0x16b59) return 1; if (ucs==0x16b5a) return -1; if (ucs>=0x16b5b && ucs<=0x16b61) return 1; if (ucs==0x16b62) return -1; if (ucs>=0x16b63 && ucs<=0x16b77) return 1; if (ucs>=0x16b78 && ucs<=0x16b7c) return -1; if (ucs>=0x16b7d && ucs<=0x16b8f) return 1; if (ucs>=0x16b90 && ucs<=0x1afff) return -1; if (ucs>=0x1b000 && ucs<=0x1b001) return 2; if (ucs>=0x1b002 && ucs<=0x1bc9f) return -1; if (ucs>=0x1bca0 && ucs<=0x1bca3) return 0; if (ucs>=0x1bca4 && ucs<=0x1cfff) return -1; if (ucs>=0x1d000 && ucs<=0x1d007) return 1; if (ucs>=0x1d008 && ucs<=0x1d009) return 2; if (ucs>=0x1d00a && ucs<=0x1d012) return 1; if (ucs==0x1d013) return 2; if (ucs==0x1d014) return 1; if (ucs==0x1d015) return 2; if (ucs>=0x1d016 && ucs<=0x1d018) return 1; if (ucs==0x1d019) return 2; if (ucs>=0x1d01a && ucs<=0x1d01c) return 1; if (ucs>=0x1d01d && ucs<=0x1d01f) return 2; if (ucs==0x1d020) return 1; if (ucs==0x1d021) return 2; if (ucs==0x1d022) return 1; if (ucs==0x1d023) return 2; if (ucs==0x1d024) return 1; if (ucs>=0x1d025 && ucs<=0x1d02f) return 2; if (ucs==0x1d030) return 1; if (ucs>=0x1d031 && ucs<=0x1d038) return 2; if (ucs==0x1d039) return 1; if (ucs>=0x1d03a && ucs<=0x1d046) return 2; if (ucs>=0x1d047 && ucs<=0x1d048) return 1; if (ucs>=0x1d049 && ucs<=0x1d04d) return 2; if (ucs>=0x1d04e && ucs<=0x1d051) return 1; if (ucs==0x1d052) return 2; if (ucs==0x1d053) return 1; if (ucs>=0x1d054 && ucs<=0x1d056) return 2; if (ucs>=0x1d057 && ucs<=0x1d059) return 1; if (ucs>=0x1d05a && ucs<=0x1d05e) return 2; if (ucs==0x1d05f) return 1; if (ucs>=0x1d060 && ucs<=0x1d062) return 2; if (ucs==0x1d063) return 1; if (ucs>=0x1d064 && ucs<=0x1d079) return 2; if (ucs==0x1d07a) return 1; if (ucs>=0x1d07b && ucs<=0x1d07d) return 2; if (ucs>=0x1d07e && ucs<=0x1d080) return 1; if (ucs>=0x1d081 && ucs<=0x1d082) return 2; if (ucs>=0x1d083 && ucs<=0x1d086) return 1; if (ucs>=0x1d087 && ucs<=0x1d088) return 2; if (ucs>=0x1d089 && ucs<=0x1d08b) return 1; if (ucs>=0x1d08c && ucs<=0x1d08d) return 2; if (ucs>=0x1d08e && ucs<=0x1d091) return 1; if (ucs>=0x1d092 && ucs<=0x1d096) return 2; if (ucs>=0x1d097 && ucs<=0x1d09c) return 1; if (ucs==0x1d09d) return 2; if (ucs>=0x1d09e && ucs<=0x1d09f) return 1; if (ucs>=0x1d0a0 && ucs<=0x1d0a2) return 2; if (ucs==0x1d0a3) return 1; if (ucs>=0x1d0a4 && ucs<=0x1d0a7) return 2; if (ucs>=0x1d0a8 && ucs<=0x1d0a9) return 1; if (ucs==0x1d0aa) return 2; if (ucs==0x1d0ab) return 1; if (ucs==0x1d0ac) return 2; if (ucs==0x1d0ad) return 1; if (ucs>=0x1d0ae && ucs<=0x1d0b3) return 2; if (ucs>=0x1d0b4 && ucs<=0x1d0b6) return 1; if (ucs>=0x1d0b7 && ucs<=0x1d0b8) return 2; if (ucs>=0x1d0b9 && ucs<=0x1d0bb) return 1; if (ucs==0x1d0bc) return 2; if (ucs==0x1d0bd) return 1; if (ucs==0x1d0be) return 2; if (ucs==0x1d0bf) return 1; if (ucs==0x1d0c0) return 2; if (ucs>=0x1d0c1 && ucs<=0x1d0c2) return 1; if (ucs>=0x1d0c3 && ucs<=0x1d0c6) return 2; if (ucs==0x1d0c7) return 1; if (ucs>=0x1d0c8 && ucs<=0x1d0ca) return 2; if (ucs==0x1d0cb) return 1; if (ucs>=0x1d0cc && ucs<=0x1d0cf) return 2; if (ucs==0x1d0d0) return 1; if (ucs>=0x1d0d1 && ucs<=0x1d0d3) return 2; if (ucs==0x1d0d4) return 1; if (ucs>=0x1d0d5 && ucs<=0x1d0d7) return 2; if (ucs>=0x1d0d8 && ucs<=0x1d0e5) return 1; if (ucs==0x1d0e6) return 2; if (ucs==0x1d0e7) return 1; if (ucs==0x1d0e8) return 2; if (ucs>=0x1d0e9 && ucs<=0x1d0ef) return 1; if (ucs==0x1d0f0) return 2; if (ucs==0x1d0f1) return 1; if (ucs==0x1d0f2) return 2; if (ucs>=0x1d0f3 && ucs<=0x1d0f5) return 1; if (ucs>=0x1d0f6 && ucs<=0x1d0ff) return -1; if (ucs>=0x1d100 && ucs<=0x1d108) return 1; if (ucs>=0x1d109 && ucs<=0x1d111) return 2; if (ucs==0x1d112) return 1; if (ucs==0x1d113) return 2; if (ucs>=0x1d114 && ucs<=0x1d115) return 1; if (ucs>=0x1d116 && ucs<=0x1d11d) return 2; if (ucs>=0x1d11e && ucs<=0x1d120) return 1; if (ucs>=0x1d121 && ucs<=0x1d124) return 2; if (ucs>=0x1d125 && ucs<=0x1d126) return 1; if (ucs>=0x1d127 && ucs<=0x1d128) return -1; if (ucs==0x1d129) return 2; if (ucs==0x1d12a) return 1; if (ucs==0x1d12b) return 2; if (ucs>=0x1d12c && ucs<=0x1d135) return 1; if (ucs>=0x1d136 && ucs<=0x1d139) return 2; if (ucs>=0x1d13a && ucs<=0x1d158) return 1; if (ucs==0x1d159) return 0; if (ucs>=0x1d15a && ucs<=0x1d15b) return 1; if (ucs==0x1d15c) return 2; if (ucs>=0x1d15d && ucs<=0x1d164) return 1; if (ucs>=0x1d165 && ucs<=0x1d169) return 0; if (ucs>=0x1d16a && ucs<=0x1d16c) return 2; if (ucs>=0x1d16d && ucs<=0x1d182) return 0; if (ucs>=0x1d183 && ucs<=0x1d184) return 1; if (ucs>=0x1d185 && ucs<=0x1d18b) return 0; if (ucs>=0x1d18c && ucs<=0x1d191) return 1; if (ucs>=0x1d192 && ucs<=0x1d193) return 2; if (ucs>=0x1d194 && ucs<=0x1d195) return 1; if (ucs>=0x1d196 && ucs<=0x1d199) return 2; if (ucs>=0x1d19a && ucs<=0x1d19b) return 1; if (ucs>=0x1d19c && ucs<=0x1d19d) return 2; if (ucs>=0x1d19e && ucs<=0x1d1a2) return 1; if (ucs>=0x1d1a3 && ucs<=0x1d1a4) return 2; if (ucs==0x1d1a5) return 1; if (ucs>=0x1d1a6 && ucs<=0x1d1a7) return 2; if (ucs>=0x1d1a8 && ucs<=0x1d1a9) return 1; if (ucs>=0x1d1aa && ucs<=0x1d1ad) return 0; if (ucs>=0x1d1ae && ucs<=0x1d1b3) return 2; if (ucs==0x1d1b4) return 1; if (ucs>=0x1d1b5 && ucs<=0x1d1b8) return 2; if (ucs>=0x1d1b9 && ucs<=0x1d1c6) return 1; if (ucs>=0x1d1c7 && ucs<=0x1d1cf) return 2; if (ucs>=0x1d1d0 && ucs<=0x1d1d6) return 1; if (ucs>=0x1d1d7 && ucs<=0x1d1dd) return 2; if (ucs>=0x1d1de && ucs<=0x1d1ff) return -1; if (ucs>=0x1d200 && ucs<=0x1d241) return 2; if (ucs>=0x1d242 && ucs<=0x1d244) return 0; if (ucs==0x1d245) return 2; if (ucs>=0x1d246 && ucs<=0x1d2ff) return -1; if (ucs>=0x1d300 && ucs<=0x1d356) return 2; if (ucs>=0x1d357 && ucs<=0x1d35f) return -1; if (ucs>=0x1d360 && ucs<=0x1d368) return 2; if (ucs==0x1d369) return 1; if (ucs>=0x1d36a && ucs<=0x1d371) return 2; if (ucs>=0x1d372 && ucs<=0x1d3ff) return -1; if (ucs>=0x1d400 && ucs<=0x1d433) return 1; if (ucs>=0x1d434 && ucs<=0x1d454) return 2; if (ucs==0x1d455) return -1; if (ucs>=0x1d456 && ucs<=0x1d49b) return 2; if (ucs>=0x1d49c && ucs<=0x1d537) return -1; if (ucs>=0x1d538 && ucs<=0x1d539) return 1; if (ucs==0x1d53a) return -1; if (ucs>=0x1d53b && ucs<=0x1d53e) return 1; if (ucs==0x1d53f) return -1; if (ucs>=0x1d540 && ucs<=0x1d544) return 1; if (ucs==0x1d545) return -1; if (ucs==0x1d546) return 1; if (ucs>=0x1d547 && ucs<=0x1d549) return -1; if (ucs>=0x1d54a && ucs<=0x1d550) return 1; if (ucs==0x1d551) return -1; if (ucs>=0x1d552 && ucs<=0x1d56b) return 1; if (ucs>=0x1d56c && ucs<=0x1d59f) return -1; if (ucs>=0x1d5a0 && ucs<=0x1d607) return 1; if (ucs>=0x1d608 && ucs<=0x1d6a5) return 2; if (ucs>=0x1d6a6 && ucs<=0x1d6a7) return -1; if (ucs>=0x1d6a8 && ucs<=0x1d6e1) return 1; if (ucs>=0x1d6e2 && ucs<=0x1d716) return 2; if (ucs==0x1d717) return 1; if (ucs>=0x1d718 && ucs<=0x1d755) return 2; if (ucs>=0x1d756 && ucs<=0x1d78f) return 1; if (ucs>=0x1d790 && ucs<=0x1d7c9) return 2; if (ucs>=0x1d7ca && ucs<=0x1d7cb) return 1; if (ucs>=0x1d7cc && ucs<=0x1d7cd) return -1; if (ucs>=0x1d7ce && ucs<=0x1d7f5) return 1; if (ucs>=0x1d7f6 && ucs<=0x1d7ff) return 2; if (ucs>=0x1d800 && ucs<=0x1efff) return -1; if (ucs>=0x1f000 && ucs<=0x1f02b) return 2; if (ucs>=0x1f02c && ucs<=0x1f02f) return -1; if (ucs>=0x1f030 && ucs<=0x1f061) return 2; if (ucs>=0x1f062 && ucs<=0x1f093) return 1; if (ucs>=0x1f094 && ucs<=0x1f09f) return -1; if (ucs>=0x1f0a0 && ucs<=0x1f0ae) return 2; if (ucs>=0x1f0af && ucs<=0x1f0b0) return -1; if (ucs>=0x1f0b1 && ucs<=0x1f0bf) return 2; if (ucs==0x1f0c0) return -1; if (ucs>=0x1f0c1 && ucs<=0x1f0cf) return 2; if (ucs==0x1f0d0) return -1; if (ucs>=0x1f0d1 && ucs<=0x1f0f5) return 2; if (ucs>=0x1f0f6 && ucs<=0x1f0ff) return -1; if (ucs>=0x1f100 && ucs<=0x1f10a) return 1; if (ucs>=0x1f10b && ucs<=0x1f10c) return 2; if (ucs>=0x1f10d && ucs<=0x1f10f) return -1; if (ucs>=0x1f110 && ucs<=0x1f12d) return 1; if (ucs==0x1f12e) return 2; if (ucs==0x1f12f) return -1; if (ucs>=0x1f130 && ucs<=0x1f169) return 1; if (ucs>=0x1f16a && ucs<=0x1f16b) return 2; if (ucs>=0x1f16c && ucs<=0x1f16f) return -1; if (ucs>=0x1f170 && ucs<=0x1f19a) return 1; if (ucs>=0x1f19b && ucs<=0x1f1e5) return -1; if (ucs>=0x1f1e6 && ucs<=0x1f202) return 2; if (ucs>=0x1f203 && ucs<=0x1f20f) return -1; if (ucs>=0x1f210 && ucs<=0x1f23a) return 2; if (ucs>=0x1f23b && ucs<=0x1f23f) return -1; if (ucs>=0x1f240 && ucs<=0x1f248) return 2; if (ucs>=0x1f249 && ucs<=0x1f24f) return -1; if (ucs>=0x1f250 && ucs<=0x1f251) return 2; if (ucs>=0x1f252 && ucs<=0x1f2ff) return -1; if (ucs>=0x1f300 && ucs<=0x1f322) return 2; if (ucs>=0x1f323 && ucs<=0x1f32f) return -1; if (ucs>=0x1f330 && ucs<=0x1f335) return 2; if (ucs==0x1f336) return -1; if (ucs==0x1f337) return 2; if (ucs>=0x1f338 && ucs<=0x1f33f) return -1; if (ucs>=0x1f340 && ucs<=0x1f341) return 2; if (ucs>=0x1f342 && ucs<=0x1f343) return -1; if (ucs==0x1f344) return 2; if (ucs>=0x1f345 && ucs<=0x1f348) return -1; if (ucs==0x1f349) return 2; if (ucs==0x1f34a) return -1; if (ucs==0x1f34b) return 2; if (ucs>=0x1f34c && ucs<=0x1f353) return -1; if (ucs>=0x1f354 && ucs<=0x1f355) return 2; if (ucs>=0x1f356 && ucs<=0x1f373) return -1; if (ucs==0x1f374) return 2; if (ucs>=0x1f375 && ucs<=0x1f376) return -1; if (ucs>=0x1f377 && ucs<=0x1f378) return 2; if (ucs>=0x1f379 && ucs<=0x1f37b) return -1; if (ucs>=0x1f37c && ucs<=0x1f37d) return 2; if (ucs>=0x1f37e && ucs<=0x1f382) return -1; if (ucs==0x1f383) return 2; if (ucs>=0x1f384 && ucs<=0x1f387) return -1; if (ucs==0x1f388) return 2; if (ucs>=0x1f389 && ucs<=0x1f38b) return -1; if (ucs==0x1f38c) return 2; if (ucs>=0x1f38d && ucs<=0x1f392) return -1; if (ucs==0x1f393) return 2; if (ucs>=0x1f394 && ucs<=0x1f395) return -1; if (ucs>=0x1f396 && ucs<=0x1f398) return 2; if (ucs==0x1f399) return -1; if (ucs==0x1f39a) return 2; if (ucs>=0x1f39b && ucs<=0x1f39d) return -1; if (ucs==0x1f39e) return 2; if (ucs>=0x1f39f && ucs<=0x1f3a0) return -1; if (ucs==0x1f3a1) return 2; if (ucs==0x1f3a2) return -1; if (ucs==0x1f3a3) return 2; if (ucs==0x1f3a4) return -1; if (ucs==0x1f3a5) return 2; if (ucs==0x1f3a6) return -1; if (ucs==0x1f3a7) return 2; if (ucs>=0x1f3a8 && ucs<=0x1f3ab) return -1; if (ucs>=0x1f3ac && ucs<=0x1f3af) return 2; if (ucs==0x1f3b0) return -1; if (ucs>=0x1f3b1 && ucs<=0x1f3b3) return 2; if (ucs>=0x1f3b4 && ucs<=0x1f3b5) return -1; if (ucs==0x1f3b6) return 2; if (ucs>=0x1f3b7 && ucs<=0x1f3b8) return -1; if (ucs==0x1f3b9) return 2; if (ucs>=0x1f3ba && ucs<=0x1f3bb) return -1; if (ucs==0x1f3bc) return 2; if (ucs==0x1f3bd) return -1; if (ucs>=0x1f3be && ucs<=0x1f3c1) return 2; if (ucs>=0x1f3c2 && ucs<=0x1f3c5) return -1; if (ucs==0x1f3c6) return 2; if (ucs==0x1f3c7) return -1; if (ucs>=0x1f3c8 && ucs<=0x1f3c9) return 2; if (ucs>=0x1f3ca && ucs<=0x1f3d6) return -1; if (ucs==0x1f3d7) return 2; if (ucs>=0x1f3d8 && ucs<=0x1f3da) return -1; if (ucs>=0x1f3db && ucs<=0x1f3dc) return 2; if (ucs==0x1f3dd) return -1; if (ucs==0x1f3de) return 2; if (ucs==0x1f3df) return -1; if (ucs>=0x1f3e0 && ucs<=0x1f3e6) return 2; if (ucs==0x1f3e7) return -1; if (ucs>=0x1f3e8 && ucs<=0x1f3e9) return 2; if (ucs>=0x1f3ea && ucs<=0x1f3ec) return -1; if (ucs==0x1f3ed) return 2; if (ucs==0x1f3ee) return -1; if (ucs>=0x1f3ef && ucs<=0x1f3f0) return 2; if (ucs>=0x1f3f1 && ucs<=0x1f3f6) return -1; if (ucs==0x1f3f7) return 2; if (ucs>=0x1f3f8 && ucs<=0x1f406) return -1; if (ucs==0x1f407) return 2; if (ucs>=0x1f408 && ucs<=0x1f40b) return -1; if (ucs>=0x1f40c && ucs<=0x1f40d) return 2; if (ucs>=0x1f40e && ucs<=0x1f415) return -1; if (ucs>=0x1f416 && ucs<=0x1f422) return 2; if (ucs>=0x1f423 && ucs<=0x1f426) return -1; if (ucs==0x1f427) return 2; if (ucs>=0x1f428 && ucs<=0x1f429) return -1; if (ucs>=0x1f42a && ucs<=0x1f42c) return 2; if (ucs>=0x1f42d && ucs<=0x1f432) return -1; if (ucs==0x1f433) return 2; if (ucs>=0x1f434 && ucs<=0x1f43c) return -1; if (ucs>=0x1f43d && ucs<=0x1f43e) return 2; if (ucs==0x1f43f) return -1; if (ucs>=0x1f440 && ucs<=0x1f441) return 2; if (ucs>=0x1f442 && ucs<=0x1f450) return -1; if (ucs==0x1f451) return 2; if (ucs==0x1f452) return -1; if (ucs>=0x1f453 && ucs<=0x1f459) return 2; if (ucs>=0x1f45a && ucs<=0x1f463) return -1; if (ucs>=0x1f464 && ucs<=0x1f46d) return 2; if (ucs>=0x1f46e && ucs<=0x1f476) return -1; if (ucs>=0x1f477 && ucs<=0x1f478) return 2; if (ucs>=0x1f479 && ucs<=0x1f47a) return -1; if (ucs==0x1f47b) return 2; if (ucs==0x1f47c) return -1; if (ucs>=0x1f47d && ucs<=0x1f47e) return 2; if (ucs>=0x1f47f && ucs<=0x1f483) return -1; if (ucs==0x1f484) return 2; if (ucs>=0x1f485 && ucs<=0x1f487) return -1; if (ucs>=0x1f488 && ucs<=0x1f48a) return 2; if (ucs==0x1f48b) return -1; if (ucs==0x1f48c) return 2; if (ucs>=0x1f48d && ucs<=0x1f490) return -1; if (ucs==0x1f491) return 2; if (ucs==0x1f492) return -1; if (ucs>=0x1f493 && ucs<=0x1f4a9) return 2; if (ucs>=0x1f4aa && ucs<=0x1f4ab) return -1; if (ucs>=0x1f4ac && ucs<=0x1f4ad) return 2; if (ucs==0x1f4ae) return -1; if (ucs>=0x1f4af && ucs<=0x1f4b7) return 2; if (ucs==0x1f4b8) return -1; if (ucs==0x1f4b9) return 2; if (ucs==0x1f4ba) return -1; if (ucs>=0x1f4bb && ucs<=0x1f4c0) return 2; if (ucs>=0x1f4c1 && ucs<=0x1f4c3) return -1; if (ucs>=0x1f4c4 && ucs<=0x1f4c5) return 2; if (ucs>=0x1f4c6 && ucs<=0x1f4c7) return -1; if (ucs>=0x1f4c8 && ucs<=0x1f4cb) return 2; if (ucs>=0x1f4cc && ucs<=0x1f4cd) return -1; if (ucs>=0x1f4ce && ucs<=0x1f4d0) return 2; if (ucs>=0x1f4d1 && ucs<=0x1f4dc) return -1; if (ucs==0x1f4dd) return 2; if (ucs>=0x1f4de && ucs<=0x1f4ee) return -1; if (ucs>=0x1f4ef && ucs<=0x1f4f8) return 2; if (ucs==0x1f4f9) return -1; if (ucs>=0x1f4fa && ucs<=0x1f4fb) return 2; if (ucs>=0x1f4fc && ucs<=0x1f4fd) return -1; if (ucs==0x1f4fe) return 2; if (ucs==0x1f4ff) return -1; if (ucs>=0x1f500 && ucs<=0x1f50e) return 2; if (ucs>=0x1f50f && ucs<=0x1f510) return -1; if (ucs>=0x1f511 && ucs<=0x1f525) return 2; if (ucs==0x1f526) return -1; if (ucs>=0x1f527 && ucs<=0x1f528) return 2; if (ucs==0x1f529) return -1; if (ucs>=0x1f52a && ucs<=0x1f52b) return 2; if (ucs>=0x1f52c && ucs<=0x1f52e) return -1; if (ucs>=0x1f52f && ucs<=0x1f549) return 2; if (ucs>=0x1f54a && ucs<=0x1f54f) return -1; if (ucs>=0x1f550 && ucs<=0x1f567) return 2; if (ucs>=0x1f568 && ucs<=0x1f56e) return -1; if (ucs>=0x1f56f && ucs<=0x1f571) return 2; if (ucs==0x1f572) return -1; if (ucs==0x1f573) return 2; if (ucs>=0x1f574 && ucs<=0x1f575) return -1; if (ucs>=0x1f576 && ucs<=0x1f579) return 2; if (ucs>=0x1f57a && ucs<=0x1f581) return -1; if (ucs>=0x1f582 && ucs<=0x1f583) return 2; if (ucs==0x1f584) return -1; if (ucs>=0x1f585 && ucs<=0x1f586) return 2; if (ucs>=0x1f587 && ucs<=0x1f58f) return -1; if (ucs==0x1f590) return 2; if (ucs>=0x1f591 && ucs<=0x1f594) return -1; if (ucs>=0x1f595 && ucs<=0x1f596) return 2; if (ucs>=0x1f597 && ucs<=0x1f5a6) return -1; if (ucs==0x1f5a7) return 2; if (ucs==0x1f5a8) return -1; if (ucs==0x1f5a9) return 2; if (ucs>=0x1f5aa && ucs<=0x1f5ad) return -1; if (ucs>=0x1f5ae && ucs<=0x1f5b3) return 2; if (ucs==0x1f5b4) return -1; if (ucs>=0x1f5b5 && ucs<=0x1f5c1) return 2; if (ucs>=0x1f5c2 && ucs<=0x1f5c3) return -1; if (ucs>=0x1f5c4 && ucs<=0x1f5d0) return 2; if (ucs==0x1f5d1) return -1; if (ucs>=0x1f5d2 && ucs<=0x1f5dc) return 2; if (ucs>=0x1f5dd && ucs<=0x1f5e1) return -1; if (ucs==0x1f5e2) return 2; if (ucs==0x1f5e3) return -1; if (ucs>=0x1f5e4 && ucs<=0x1f5ed) return 2; if (ucs>=0x1f5ee && ucs<=0x1f5f3) return -1; if (ucs>=0x1f5f4 && ucs<=0x1f5f9) return 2; if (ucs>=0x1f5fa && ucs<=0x1f5fb) return -1; if (ucs==0x1f5fc) return 2; if (ucs==0x1f5fd) return -1; if (ucs==0x1f5fe) return 2; if (ucs==0x1f5ff) return -1; if (ucs>=0x1f600 && ucs<=0x1f642) return 2; if (ucs>=0x1f643 && ucs<=0x1f644) return -1; if (ucs>=0x1f645 && ucs<=0x1f64f) return 2; if (ucs>=0x1f650 && ucs<=0x1f6ff) return -1; if (ucs>=0x1f700 && ucs<=0x1f721) return 2; if (ucs>=0x1f722 && ucs<=0x1f723) return 1; if (ucs==0x1f724) return 2; if (ucs>=0x1f725 && ucs<=0x1f727) return 1; if (ucs>=0x1f728 && ucs<=0x1f72b) return 2; if (ucs>=0x1f72c && ucs<=0x1f72e) return 1; if (ucs>=0x1f72f && ucs<=0x1f730) return 2; if (ucs==0x1f731) return 1; if (ucs>=0x1f732 && ucs<=0x1f74a) return 2; if (ucs==0x1f74b) return 1; if (ucs==0x1f74c) return 2; if (ucs==0x1f74d) return 1; if (ucs>=0x1f74e && ucs<=0x1f773) return 2; if (ucs>=0x1f774 && ucs<=0x1ffff) return -1; if (ucs>=0x20000 && ucs<=0x2a6d6) return 2; if (ucs>=0x2a6d7 && ucs<=0x2a6ff) return -1; if (ucs>=0x2a700 && ucs<=0x2b734) return 2; if (ucs>=0x2b735 && ucs<=0x2b73f) return -1; if (ucs>=0x2b740 && ucs<=0x2b81d) return 2; if (ucs>=0x2b81e && ucs<=0x2f7ff) return -1; if (ucs>=0x2f800 && ucs<=0x2fa1d) return 2; if (ucs>=0x2fa1e && ucs<=0xe0000) return -1; if (ucs==0xe0001) return 0; if (ucs>=0xe0002 && ucs<=0xe001f) return -1; if (ucs>=0xe0020 && ucs<=0xe007f) return 0; if (ucs>=0xe0080 && ucs<=0xe00ff) return -1; if (ucs>=0xe0100 && ucs<=0xe01ef) return 1; if (ucs>=0xe01f0 && ucs<=0xeffff) return -1; if (ucs>=0xf0000 && ucs<=0xffffd) return 1; if (ucs>=0xffffe && ucs<=0xfffff) return -1; if (ucs>=0x100000 && ucs<=0x10fffd) return 1; if (ucs>=0x10fffe && ucs<=0x10ffff) return -1; }