|
|
@@ -92,10 +92,67 @@ static int properties_Pd(codepoint_t c) |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
static int properties_Pe(codepoint_t c) |
|
|
|
{ |
|
|
|
switch (c & 0xFFFFFF00) |
|
|
|
{ |
|
|
|
case 0x3000: |
|
|
|
if (c == 0x300D) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
if (c == 0x300F) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
if (c >= 0x301E && c <= 0x301F) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
break; |
|
|
|
case 0xFE00: |
|
|
|
if (c == 0xFE42) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
if (c == 0xFE44) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
break; |
|
|
|
case 0xFF00: |
|
|
|
if (c == 0xFF63) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
break; |
|
|
|
} |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
static int properties_Pf(codepoint_t c) |
|
|
|
{ |
|
|
|
switch (c & 0xFFFFFF00) |
|
|
|
{ |
|
|
|
case 0x0000: |
|
|
|
if (c == 0x00BB) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
break; |
|
|
|
case 0x2000: |
|
|
|
if (c == 0x2019) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
if (c == 0x201D) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
if (c == 0x203A) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
break; |
|
|
|
} |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
static int properties_Pi(codepoint_t c) |
|
|
|
{ |
|
|
|
switch (c & 0xFFFFFF00) |
|
|
|
{ |
|
|
|
case 0x0000: |
|
|
|
if (c == 0x00AB) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
break; |
|
|
|
case 0x2000: |
|
|
|
if (c == 0x2018) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
if (c >= 0x201B && c <= 0x201C) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
if (c == 0x201F) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
if (c == 0x2039) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
break; |
|
|
|
} |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
static int properties_Po(codepoint_t c) |
|
|
|
{ |
|
|
|
switch (c & 0xFFFFFF00) |
|
|
|
{ |
|
|
|
case 0x0000: |
|
|
|
if (c == 0x0022) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
if (c == 0x0027) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
break; |
|
|
|
case 0x0F00: |
|
|
|
if (c == 0x0F0C) return UCD_PROPERTY_NO_BREAK; |
|
|
|
break; |
|
|
@@ -106,12 +163,41 @@ static int properties_Po(codepoint_t c) |
|
|
|
if (c == 0x30FB) return UCD_PROPERTY_HYPHEN; |
|
|
|
break; |
|
|
|
case 0xFF00: |
|
|
|
if (c == 0xFF02) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
if (c == 0xFF07) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
if (c == 0xFF65) return UCD_PROPERTY_HYPHEN; |
|
|
|
break; |
|
|
|
} |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
static int properties_Ps(codepoint_t c) |
|
|
|
{ |
|
|
|
switch (c & 0xFFFFFF00) |
|
|
|
{ |
|
|
|
case 0x2000: |
|
|
|
if (c == 0x201A) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
if (c == 0x201E) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
break; |
|
|
|
case 0x2E00: |
|
|
|
if (c == 0x2E42) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
break; |
|
|
|
case 0x3000: |
|
|
|
if (c == 0x300C) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
if (c == 0x300E) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
if (c == 0x301D) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
break; |
|
|
|
case 0xFE00: |
|
|
|
if (c == 0xFE41) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
if (c == 0xFE43) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
break; |
|
|
|
case 0xFF00: |
|
|
|
if (c == 0xFF62) return UCD_PROPERTY_QUOTATION_MARK; |
|
|
|
break; |
|
|
|
} |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
static int properties_Sm(codepoint_t c) |
|
|
|
{ |
|
|
|
switch (c & 0xFFFFFF00) |
|
|
@@ -146,7 +232,11 @@ ucd_property ucd_properties(codepoint_t c, ucd_category category) |
|
|
|
case UCD_CATEGORY_Cc: return properties_Cc(c); |
|
|
|
case UCD_CATEGORY_Cf: return properties_Cf(c); |
|
|
|
case UCD_CATEGORY_Pd: return properties_Pd(c); |
|
|
|
case UCD_CATEGORY_Pe: return properties_Pe(c); |
|
|
|
case UCD_CATEGORY_Pf: return properties_Pf(c); |
|
|
|
case UCD_CATEGORY_Pi: return properties_Pi(c); |
|
|
|
case UCD_CATEGORY_Po: return properties_Po(c); |
|
|
|
case UCD_CATEGORY_Ps: return properties_Ps(c); |
|
|
|
case UCD_CATEGORY_Sm: return properties_Sm(c); |
|
|
|
case UCD_CATEGORY_Zl: return UCD_PROPERTY_WHITE_SPACE; |
|
|
|
case UCD_CATEGORY_Zp: return UCD_PROPERTY_WHITE_SPACE; |