107
108
int Windows1252Encoding::convert(const unsigned char* bytes) const
110
return _charMap[*bytes];
113
114
int Windows1252Encoding::convert(int ch, unsigned char* bytes, int length) const
115
if (ch >= 0 && ch <= 255)
116
if (ch >= 0 && ch <= 255 && _charMap[ch] == ch)
117
118
if (bytes && length >= 1)
118
*bytes = (unsigned char) ch;
124
case 0x20ac: if (bytes && length >= 1) *bytes = 0x80; return 1;
125
case 0x201a: if (bytes && length >= 1) *bytes = 0x82; return 1;
126
case 0x0192: if (bytes && length >= 1) *bytes = 0x83; return 1;
127
case 0x201e: if (bytes && length >= 1) *bytes = 0x84; return 1;
128
case 0x2026: if (bytes && length >= 1) *bytes = 0x85; return 1;
129
case 0x2020: if (bytes && length >= 1) *bytes = 0x86; return 1;
130
case 0x2021: if (bytes && length >= 1) *bytes = 0x87; return 1;
131
case 0x02c6: if (bytes && length >= 1) *bytes = 0x88; return 1;
132
case 0x2030: if (bytes && length >= 1) *bytes = 0x89; return 1;
133
case 0x0160: if (bytes && length >= 1) *bytes = 0x8a; return 1;
134
case 0x2039: if (bytes && length >= 1) *bytes = 0x8b; return 1;
135
case 0x0152: if (bytes && length >= 1) *bytes = 0x8c; return 1;
136
case 0x017d: if (bytes && length >= 1) *bytes = 0x8e; return 1;
137
case 0x2018: if (bytes && length >= 1) *bytes = 0x91; return 1;
138
case 0x2019: if (bytes && length >= 1) *bytes = 0x92; return 1;
139
case 0x201c: if (bytes && length >= 1) *bytes = 0x93; return 1;
140
case 0x201d: if (bytes && length >= 1) *bytes = 0x94; return 1;
141
case 0x2022: if (bytes && length >= 1) *bytes = 0x95; return 1;
142
case 0x2013: if (bytes && length >= 1) *bytes = 0x96; return 1;
143
case 0x2014: if (bytes && length >= 1) *bytes = 0x97; return 1;
144
case 0x02dc: if (bytes && length >= 1) *bytes = 0x98; return 1;
145
case 0x2122: if (bytes && length >= 1) *bytes = 0x99; return 1;
146
case 0x0161: if (bytes && length >= 1) *bytes = 0x9a; return 1;
147
case 0x203a: if (bytes && length >= 1) *bytes = 0x9b; return 1;
148
case 0x0153: if (bytes && length >= 1) *bytes = 0x9c; return 1;
149
case 0x017e: if (bytes && length >= 1) *bytes = 0x9e; return 1;
150
case 0x0178: if (bytes && length >= 1) *bytes = 0x9f; return 1;