mbfl_filt_conv_common_flush };
static struct mbfl_convert_vtbl vtbl_wchar_cp1252 = {
- mbfl_no_encoding_cp1252,
mbfl_no_encoding_wchar,
+ mbfl_no_encoding_cp1252,
mbfl_filt_conv_common_ctor,
mbfl_filt_conv_common_dtor,
mbfl_filt_conv_wchar_cp1252,
if (c >= 0x100) {
/* look it up from the cp1252 table */
s = -1;
- n = 30;
+ n = 31;
while (n >= 0) {
- if (c == cp1252_ucs_table[n]) {
+ if (c == cp1252_ucs_table[n] && c != 0xfffe) {
s = 0x80 + n;
break;
}
* This table differs from the rest of the unicode tables below
* as it only covers this range, while the rest cover 0xa0 onwards */
static const unsigned short cp1252_ucs_table[] = {
- 0xfffe,0xfffe,0x201a,0x0192,0x201e,0x2026,0x2020,0x2021,
- 0x02c6,0x2030,0x0160,0x2039,0x0152,0xfffe,0xfffe,0xfffe,
- 0xfffe,0x2018,0x2019,0x201c,0x201d,0x2022,0x2013,0x02dc,
- 0x2122,0x0161,0x203a,0x0153,0xfffe,0xfffe,0x0178
+ 0x20ac,0xfffe,0x201a,0x0192,0x201e,0x2026,0x2020,0x2021,
+ 0x02c6,0x2030,0x0160,0x2039,0x0152,0xfffe,0x017d,0xfffe,
+ 0xfffe,0x2018,0x2019,0x201c,0x201d,0x2022,0x2013,0x2014,
+ 0x02dc,0x2122,0x0161,0x203a,0x0153,0xfffe,0x017e,0x0178
};