From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 18 Nov 2001 16:38:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 18 Nov 2001 16:38:18 -0500 Received: from smtp3.vol.cz ([195.250.128.83]:65035 "EHLO smtp3.vol.cz") by vger.kernel.org with ESMTP id ; Sun, 18 Nov 2001 16:38:03 -0500 Message-ID: <000801c17079$84bdf5c0$2ca76cc0@nevskij> From: =?iso-8859-2?Q?Petr_Tit=ECra?= To: Subject: [PATCH] windows CP1250 codepage Date: Sun, 18 Nov 2001 22:37:33 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0005_01C17081.9D30FCD0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This is a multi-part message in MIME format. ------=_NextPart_000_0005_01C17081.9D30FCD0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit Linux contains two codepages for Central European languages (CP852 and iso8859-2) but neither one is correct for character encoding used in Central European version of Windows (which uses Microsoft's CP1250). This patch adds support for this codepage. Patch is against kernel 2.4.14 but should apply to newer versions too as this part of code changes minimaly. Petr Titera Petr.Titera@quick.cz ------=_NextPart_000_0005_01C17081.9D30FCD0 Content-Type: application/octet-stream; name="patch-cp1250.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="patch-cp1250.diff" diff -urN linux-2.4.14-v/Documentation/Configure.help = linux-2.4.14-p/Documentation/Configure.help=0A= --- linux-2.4.14-v/Documentation/Configure.help Mon Nov 5 22:40:59 2001=0A= +++ linux-2.4.14-p/Documentation/Configure.help Sun Nov 18 19:18:24 2001=0A= @@ -13427,6 +13427,16 @@=0A= say Y here if you want to include the DOS codepage for Traditional=0A= Chinese(Big5).=0A= =0A= +nls codepage 1250=0A= +CONFIG_NLS_CODEPAGE_1250=0A= + If you want to display filenames with native language characters=0A= + from the Microsoft FAT file system family or from JOLIET CDROMs=0A= + correctly on the screen, you need to include the appropriate=0A= + input/output character sets. Say Y here for the Windows CP-1250=0A= + character set, which works for most Latin-written Slavic and Central=0A= + European languages: Czech, German, Hungarian, Polish, Rumanian, = Croatian,=0A= + Slovak, Slovene.=0A= +=0A= nls iso8859-1=0A= CONFIG_NLS_ISO8859_1=0A= If you want to display filenames with native language characters=0A= diff -urN linux-2.4.14-v/fs/nls/Config.in linux-2.4.14-p/fs/nls/Config.in=0A= --- linux-2.4.14-v/fs/nls/Config.in Thu Jun 28 02:10:55 2001=0A= +++ linux-2.4.14-p/fs/nls/Config.in Sun Nov 18 19:05:02 2001=0A= @@ -43,6 +43,7 @@=0A= tristate 'Korean charset (CP949, EUC-KR)' = CONFIG_NLS_CODEPAGE_949=0A= tristate 'Thai charset (CP874, TIS-620)' = CONFIG_NLS_CODEPAGE_874=0A= tristate 'Hebrew charsets (ISO-8859-8, CP1255)' CONFIG_NLS_ISO8859_8=0A= + tristate 'Windows CP1250 (Slavic/Central European Languages)' = CONFIG_NLS_CODEPAGE_1250=0A= tristate 'Windows CP1251 (Bulgarian, Belarusian)' = CONFIG_NLS_CODEPAGE_1251=0A= tristate 'NLS ISO 8859-1 (Latin 1; Western European Languages)' = CONFIG_NLS_ISO8859_1=0A= tristate 'NLS ISO 8859-2 (Latin 2; Slavic/Central European = Languages)' CONFIG_NLS_ISO8859_2=0A= diff -urN linux-2.4.14-v/fs/nls/nls_cp1250.c = linux-2.4.14-p/fs/nls/nls_cp1250.c=0A= --- linux-2.4.14-v/fs/nls/nls_cp1250.c Thu Jan 1 01:00:00 1970=0A= +++ linux-2.4.14-p/fs/nls/nls_cp1250.c Sun Nov 18 18:59:15 2001=0A= @@ -0,0 +1,365 @@=0A= +/*=0A= + * linux/fs/nls_cp1250.c=0A= + *=0A= + * Charset cp1250 translation tables.=0A= + * Generated automatically from the Unicode and charset=0A= + * tables from the Unicode Organization (www.unicode.org).=0A= + * The Unicode to charset table has only exact mappings.=0A= + */=0A= +=0A= +#include =0A= +#include =0A= +#include =0A= +#include =0A= +#include =0A= +=0A= +static wchar_t charset2uni[256] =3D {=0A= + /* 0x00*/=0A= + 0x0000, 0x0001, 0x0002, 0x0003, =0A= + 0x0004, 0x0005, 0x0006, 0x0007, =0A= + 0x0008, 0x0009, 0x000a, 0x000b, =0A= + 0x000c, 0x000d, 0x000e, 0x000f, =0A= + /* 0x10*/=0A= + 0x0010, 0x0011, 0x0012, 0x0013, =0A= + 0x0014, 0x0015, 0x0016, 0x0017, =0A= + 0x0018, 0x0019, 0x001a, 0x001b, =0A= + 0x001c, 0x001d, 0x001e, 0x001f, =0A= + /* 0x20*/=0A= + 0x0020, 0x0021, 0x0022, 0x0023, =0A= + 0x0024, 0x0025, 0x0026, 0x0027, =0A= + 0x0028, 0x0029, 0x002a, 0x002b, =0A= + 0x002c, 0x002d, 0x002e, 0x002f, =0A= + /* 0x30*/=0A= + 0x0030, 0x0031, 0x0032, 0x0033, =0A= + 0x0034, 0x0035, 0x0036, 0x0037, =0A= + 0x0038, 0x0039, 0x003a, 0x003b, =0A= + 0x003c, 0x003d, 0x003e, 0x003f, =0A= + /* 0x40*/=0A= + 0x0040, 0x0041, 0x0042, 0x0043, =0A= + 0x0044, 0x0045, 0x0046, 0x0047, =0A= + 0x0048, 0x0049, 0x004a, 0x004b, =0A= + 0x004c, 0x004d, 0x004e, 0x004f, =0A= + /* 0x50*/=0A= + 0x0050, 0x0051, 0x0052, 0x0053, =0A= + 0x0054, 0x0055, 0x0056, 0x0057, =0A= + 0x0058, 0x0059, 0x005a, 0x005b, =0A= + 0x005c, 0x005d, 0x005e, 0x005f, =0A= + /* 0x60*/=0A= + 0x0060, 0x0061, 0x0062, 0x0063, =0A= + 0x0064, 0x0065, 0x0066, 0x0067, =0A= + 0x0068, 0x0069, 0x006a, 0x006b, =0A= + 0x006c, 0x006d, 0x006e, 0x006f, =0A= + /* 0x70*/=0A= + 0x0070, 0x0071, 0x0072, 0x0073, =0A= + 0x0074, 0x0075, 0x0076, 0x0077, =0A= + 0x0078, 0x0079, 0x007a, 0x007b, =0A= + 0x007c, 0x007d, 0x007e, 0x007f, =0A= + /* 0x80*/=0A= + 0x20ac, 0x0000, 0x201a, 0x0000, =0A= + 0x201e, 0x2026, 0x2020, 0x2021, =0A= + 0x0000, 0x2030, 0x0160, 0x2039, =0A= + 0x015a, 0x0164, 0x017d, 0x0179, =0A= + /* 0x90*/=0A= + 0x0000, 0x2018, 0x2019, 0x201c, =0A= + 0x201d, 0x2022, 0x2013, 0x2014, =0A= + 0x0000, 0x2122, 0x0161, 0x203a, =0A= + 0x015b, 0x0165, 0x017e, 0x017a, =0A= + /* 0xa0*/=0A= + 0x00a0, 0x02c7, 0x02d8, 0x0141, =0A= + 0x00a4, 0x0104, 0x00a6, 0x00a7, =0A= + 0x00a8, 0x00a9, 0x015e, 0x00ab, =0A= + 0x00ac, 0x00ad, 0x00ae, 0x017b, =0A= + /* 0xb0*/=0A= + 0x00b0, 0x00b1, 0x02db, 0x0142, =0A= + 0x00b4, 0x00b5, 0x00b6, 0x00b7, =0A= + 0x00b8, 0x0105, 0x015f, 0x00bb, =0A= + 0x013d, 0x02dd, 0x013e, 0x017c, =0A= + /* 0xc0*/=0A= + 0x0154, 0x00c1, 0x00c2, 0x0102, =0A= + 0x00c4, 0x0139, 0x0106, 0x00c7, =0A= + 0x010c, 0x00c9, 0x0118, 0x00cb, =0A= + 0x011a, 0x00cd, 0x00ce, 0x010e, =0A= + /* 0xd0*/=0A= + 0x0110, 0x0143, 0x0147, 0x00d3, =0A= + 0x00d4, 0x0150, 0x00d6, 0x00d7, =0A= + 0x0158, 0x016e, 0x00da, 0x0170, =0A= + 0x00dc, 0x00dd, 0x0162, 0x00df, =0A= + /* 0xe0*/=0A= + 0x0155, 0x00e1, 0x00e2, 0x0103, =0A= + 0x00e4, 0x013a, 0x0107, 0x00e7, =0A= + 0x010d, 0x00e9, 0x0119, 0x00eb, =0A= + 0x011b, 0x00ed, 0x00ee, 0x010f, =0A= + /* 0xf0*/=0A= + 0x0111, 0x0144, 0x0148, 0x00f3, =0A= + 0x00f4, 0x0151, 0x00f6, 0x00f7, =0A= + 0x0159, 0x016f, 0x00fa, 0x0171, =0A= + 0x00fc, 0x00fd, 0x0163, 0x02d9, =0A= + };=0A= +=0A= +static unsigned char page00[256] =3D {=0A= + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */=0A= + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */=0A= + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */=0A= + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, /* 0x18-0x1f */=0A= + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, /* 0x20-0x27 */=0A= + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, /* 0x28-0x2f */=0A= + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 0x30-0x37 */=0A= + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, /* 0x38-0x3f */=0A= + 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* 0x40-0x47 */=0A= + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, /* 0x48-0x4f */=0A= + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /* 0x50-0x57 */=0A= + 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, /* 0x58-0x5f */=0A= + 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 0x60-0x67 */=0A= + 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, /* 0x68-0x6f */=0A= + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /* 0x70-0x77 */=0A= + 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, /* 0x78-0x7f */=0A= +=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */=0A= + 0xa0, 0x00, 0x00, 0x00, 0xa4, 0x00, 0xa6, 0xa7, /* 0xa0-0xa7 */=0A= + 0xa8, 0xa9, 0x00, 0xab, 0xac, 0xad, 0xae, 0x00, /* 0xa8-0xaf */=0A= + 0xb0, 0xb1, 0x00, 0x00, 0xb4, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */=0A= + 0xb8, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */=0A= + 0x00, 0xc1, 0xc2, 0x00, 0xc4, 0x00, 0x00, 0xc7, /* 0xc0-0xc7 */=0A= + 0x00, 0xc9, 0x00, 0xcb, 0x00, 0xcd, 0xce, 0x00, /* 0xc8-0xcf */=0A= + 0x00, 0x00, 0x00, 0xd3, 0xd4, 0x00, 0xd6, 0xd7, /* 0xd0-0xd7 */=0A= + 0x00, 0x00, 0xda, 0x00, 0xdc, 0xdd, 0x00, 0xdf, /* 0xd8-0xdf */=0A= + 0x00, 0xe1, 0xe2, 0x00, 0xe4, 0x00, 0x00, 0xe7, /* 0xe0-0xe7 */=0A= + 0x00, 0xe9, 0x00, 0xeb, 0x00, 0xed, 0xee, 0x00, /* 0xe8-0xef */=0A= + 0x00, 0x00, 0x00, 0xf3, 0xf4, 0x00, 0xf6, 0xf7, /* 0xf0-0xf7 */=0A= + 0x00, 0x00, 0xfa, 0x00, 0xfc, 0xfd, 0x00, 0x00, /* 0xf8-0xff */=0A= + };=0A= +=0A= +static unsigned char page01[256] =3D {=0A= + 0x00, 0x00, 0xc3, 0xe3, 0xa5, 0xb9, 0xc6, 0xe6, /* 0x00-0x07 */=0A= + 0x00, 0x00, 0x00, 0x00, 0xc8, 0xe8, 0xcf, 0xef, /* 0x08-0x0f */=0A= + 0xd0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */=0A= + 0xca, 0xea, 0xcc, 0xec, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */=0A= + 0x00, 0xc5, 0xe5, 0x00, 0x00, 0xbc, 0xbe, 0x00, /* 0x38-0x3f */=0A= + 0x00, 0xa3, 0xb3, 0xd1, 0xf1, 0x00, 0x00, 0xd2, /* 0x40-0x47 */=0A= + 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */=0A= + 0xd5, 0xf5, 0x00, 0x00, 0xc0, 0xe0, 0x00, 0x00, /* 0x50-0x57 */=0A= + 0xd8, 0xf8, 0x8c, 0x9c, 0x00, 0x00, 0xaa, 0xba, /* 0x58-0x5f */=0A= + 0x8a, 0x9a, 0xde, 0xfe, 0x8d, 0x9d, 0x00, 0x00, /* 0x60-0x67 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd9, 0xf9, /* 0x68-0x6f */=0A= + 0xdb, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */=0A= + 0x00, 0x8f, 0x9f, 0xaf, 0xbf, 0x8e, 0x9e, 0x00, /* 0x78-0x7f */=0A= +=0A= + };=0A= +=0A= +static unsigned char page02[256] =3D {=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */=0A= +=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, /* 0xc0-0xc7 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd0-0xd7 */=0A= + 0xa2, 0xff, 0x00, 0xb2, 0x00, 0xbd, 0x00, 0x00, /* 0xd8-0xdf */=0A= + };=0A= +=0A= +static unsigned char page20[256] =3D {=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */=0A= + 0x00, 0x00, 0x00, 0x96, 0x97, 0x00, 0x00, 0x00, /* 0x10-0x17 */=0A= + 0x91, 0x92, 0x82, 0x00, 0x93, 0x94, 0x84, 0x00, /* 0x18-0x1f */=0A= + 0x86, 0x87, 0x95, 0x00, 0x00, 0x00, 0x85, 0x00, /* 0x20-0x27 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */=0A= + 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */=0A= + 0x00, 0x8b, 0x9b, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */=0A= +=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, /* 0xa8-0xaf */=0A= + };=0A= +=0A= +static unsigned char page21[256] =3D {=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */=0A= + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */=0A= + 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */=0A= + };=0A= +=0A= +static unsigned char *page_uni2charset[256] =3D {=0A= + page00, page01, page02, NULL, NULL, NULL, NULL, NULL,=0A= + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,=0A= + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,=0A= + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,=0A= + page20, page21, NULL, NULL, NULL, NULL, NULL, NULL,=0A= + };=0A= +=0A= +static unsigned char charset2lower[256] =3D {=0A= + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */=0A= + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */=0A= + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */=0A= + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, /* 0x18-0x1f */=0A= + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, /* 0x20-0x27 */=0A= + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, /* 0x28-0x2f */=0A= + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 0x30-0x37 */=0A= + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, /* 0x38-0x3f */=0A= + 0x40, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 0x40-0x47 */=0A= + 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, /* 0x48-0x4f */=0A= + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /* 0x50-0x57 */=0A= + 0x78, 0x79, 0x7a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, /* 0x58-0x5f */=0A= + 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 0x60-0x67 */=0A= + 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, /* 0x68-0x6f */=0A= + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, /* 0x70-0x77 */=0A= + 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, /* 0x78-0x7f */=0A= +=0A= + 0x80, 0x00, 0x82, 0x00, 0x84, 0x85, 0x86, 0x87, /* 0x80-0x87 */=0A= + 0x00, 0x89, 0x9a, 0x8b, 0x9c, 0x9d, 0x9e, 0x9f, /* 0x88-0x8f */=0A= + 0x00, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, /* 0x90-0x97 */=0A= + 0x00, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, /* 0x98-0x9f */=0A= + 0xa0, 0xa1, 0xa2, 0xb3, 0xa4, 0xb9, 0xa6, 0xa7, /* 0xa0-0xa7 */=0A= + 0xa8, 0xa9, 0xba, 0xab, 0xac, 0xad, 0xae, 0xbf, /* 0xa8-0xaf */=0A= + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */=0A= + 0xb8, 0xb9, 0xba, 0xbb, 0xbe, 0xbd, 0xbe, 0xbf, /* 0xb8-0xbf */=0A= + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0xc0-0xc7 */=0A= + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0xc8-0xcf */=0A= + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xd7, /* 0xd0-0xd7 */=0A= + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xdf, /* 0xd8-0xdf */=0A= + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0xe0-0xe7 */=0A= + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0xe8-0xef */=0A= + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0xf0-0xf7 */=0A= + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, /* 0xf8-0xff */=0A= + };=0A= +=0A= +static unsigned char charset2upper[256] =3D {=0A= + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 0x00-0x07 */=0A= + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* 0x08-0x0f */=0A= + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 0x10-0x17 */=0A= + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, /* 0x18-0x1f */=0A= + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, /* 0x20-0x27 */=0A= + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, /* 0x28-0x2f */=0A= + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 0x30-0x37 */=0A= + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, /* 0x38-0x3f */=0A= + 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* 0x40-0x47 */=0A= + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, /* 0x48-0x4f */=0A= + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /* 0x50-0x57 */=0A= + 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, /* 0x58-0x5f */=0A= + 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* 0x60-0x67 */=0A= + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, /* 0x68-0x6f */=0A= + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /* 0x70-0x77 */=0A= + 0x58, 0x59, 0x5a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, /* 0x78-0x7f */=0A= +=0A= + 0x80, 0x00, 0x82, 0x00, 0x84, 0x85, 0x86, 0x87, /* 0x80-0x87 */=0A= + 0x00, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, /* 0x88-0x8f */=0A= + 0x00, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, /* 0x90-0x97 */=0A= + 0x00, 0x99, 0x8a, 0x9b, 0x8c, 0x8d, 0x8e, 0x8f, /* 0x98-0x9f */=0A= + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, /* 0xa0-0xa7 */=0A= + 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0xa8-0xaf */=0A= + 0xb0, 0xb1, 0xb2, 0xa3, 0xb4, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */=0A= + 0xb8, 0xa5, 0xaa, 0xbb, 0xbc, 0xbd, 0xbc, 0xaf, /* 0xb8-0xbf */=0A= + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0xc0-0xc7 */=0A= + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0xc8-0xcf */=0A= + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0xd0-0xd7 */=0A= + 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0x00, /* 0xd8-0xdf */=0A= + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0xe0-0xe7 */=0A= + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0xe8-0xef */=0A= + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xf7, /* 0xf0-0xf7 */=0A= + 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xff, /* 0xf8-0xff */=0A= + };=0A= +=0A= +static int uni2char(wchar_t uni, unsigned char *out, int boundlen)=0A= +{=0A= + unsigned char *uni2charset;=0A= + unsigned char cl =3D uni & 0x00ff;=0A= + unsigned char ch =3D (uni & 0xff00) >> 8;=0A= +=0A= + if (boundlen <=3D 0)=0A= + return -ENAMETOOLONG;=0A= +=0A= + uni2charset =3D page_uni2charset[ch];=0A= + if (uni2charset && uni2charset[cl])=0A= + out[0] =3D uni2charset[cl];=0A= + else=0A= + return -EINVAL;=0A= + return 1;=0A= +}=0A= +=0A= +static int char2uni(const unsigned char *rawstring, int boundlen, = wchar_t *uni)=0A= +{=0A= + *uni =3D charset2uni[*rawstring];=0A= + if (*uni =3D=3D 0x0000)=0A= + return -EINVAL;=0A= + return 1;=0A= +}=0A= +=0A= +static struct nls_table table =3D {=0A= + "cp1250",=0A= + uni2char,=0A= + char2uni,=0A= + charset2lower,=0A= + charset2upper,=0A= + THIS_MODULE,=0A= +};=0A= +=0A= +static int __init init_nls_cp1250(void)=0A= +{=0A= + return register_nls(&table);=0A= +}=0A= +static void __exit exit_nls_cp1250(void)=0A= +{=0A= + unregister_nls(&table);=0A= +}=0A= +=0A= +module_init(init_nls_cp1250)=0A= +module_exit(exit_nls_cp1250)=0A= +=0A= +MODULE_LICENSE("BSD without advertising clause");=0A= +=0A= +/*=0A= + * Overrides for Emacs so that we follow Linus's tabbing style.=0A= + * Emacs will notice this stuff at the end of the file and automatically=0A= + * adjust the settings for this buffer only. This must remain at the = end=0A= + * of the file.=0A= + * = -------------------------------------------------------------------------= --=0A= + * Local variables:=0A= + * c-indent-level: 8=0A= + * c-brace-imaginary-offset: 0=0A= + * c-brace-offset: -8=0A= + * c-argdecl-indent: 8=0A= + * c-label-offset: -8=0A= + * c-continued-statement-offset: 8=0A= + * c-continued-brace-offset: 0=0A= + * End:=0A= + */=0A= +=0A= ------=_NextPart_000_0005_01C17081.9D30FCD0--