@@ -1008,6 +1008,30 @@ static uint8_t pm_encoding_windows_1258_table[256] = {
1008
1008
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , // Fx
1009
1009
};
1010
1010
1011
+ /**
1012
+ * Each element of the following table contains a bitfield that indicates a
1013
+ * piece of information about the corresponding windows-874 character.
1014
+ */
1015
+ static uint8_t pm_encoding_windows_874_table [256 ] = {
1016
+ // 0 1 2 3 4 5 6 7 8 9 A B C D E F
1017
+ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , // 0x
1018
+ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , // 1x
1019
+ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , // 2x
1020
+ 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 0 , 0 , 0 , 0 , 0 , 0 , // 3x
1021
+ 0 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , // 4x
1022
+ 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 0 , 0 , 0 , 0 , 0 , // 5x
1023
+ 0 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , // 6x
1024
+ 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 0 , 0 , 0 , 0 , 0 , // 7x
1025
+ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , // 8x
1026
+ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , // 9x
1027
+ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , // Ax
1028
+ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , // Bx
1029
+ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , // Cx
1030
+ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , // Dx
1031
+ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , // Ex
1032
+ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , // Fx
1033
+ };
1034
+
1011
1035
/**
1012
1036
* Returns the size of the next character in the ASCII encoding. This basically
1013
1037
* means that if the top bit is not set, the character is 1 byte long.
@@ -1114,6 +1138,7 @@ PRISM_ENCODING_TABLE(windows_1255)
1114
1138
PRISM_ENCODING_TABLE (windows_1256 )
1115
1139
PRISM_ENCODING_TABLE (windows_1257 )
1116
1140
PRISM_ENCODING_TABLE (windows_1258 )
1141
+ PRISM_ENCODING_TABLE (windows_874 )
1117
1142
1118
1143
#undef PRISM_ENCODING_TABLE
1119
1144
@@ -1546,3 +1571,13 @@ pm_encoding_t pm_encoding_windows_1258 = {
1546
1571
.isupper_char = pm_encoding_windows_1258_isupper_char ,
1547
1572
.multibyte = false
1548
1573
};
1574
+
1575
+ /** Windows-874 */
1576
+ pm_encoding_t pm_encoding_windows_874 = {
1577
+ .name = "Windows-874" ,
1578
+ .char_width = pm_encoding_single_char_width ,
1579
+ .alnum_char = pm_encoding_windows_874_alnum_char ,
1580
+ .alpha_char = pm_encoding_windows_874_alpha_char ,
1581
+ .isupper_char = pm_encoding_windows_874_isupper_char ,
1582
+ .multibyte = false
1583
+ };
0 commit comments