I've just had some spam in Windows-874, a Thai SBCS. Add libcharset
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 21 Aug 2008 18:39:52 +0000 (18:39 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 21 Aug 2008 18:39:52 +0000 (18:39 +0000)
support for it.

git-svn-id: svn://svn.tartarus.org/sgt/charset@8151 cda61777-01e9-0310-a592-d414129be87e

charset.h
localenc.c
mimeenc.c
sbcs.dat

index 144187f..596f05f 100644 (file)
--- a/charset.h
+++ b/charset.h
@@ -34,6 +34,7 @@ typedef enum {
     CS_CP437,
     CS_CP850,
     CS_CP866,
+    CS_CP874,
     CS_CP1250,
     CS_CP1251,
     CS_CP1252,
index 5c761a8..f462729 100644 (file)
@@ -48,6 +48,9 @@ static const struct {
     { "CP437", CS_CP437, 1 },
     { "CP850", CS_CP850, 1 },
     { "CP866", CS_CP866, 1 },
+    { "CP874", CS_CP874, 1 },
+    { "Win874", CS_CP874, 0 },
+    { "Win-874", CS_CP874, 0 },
     { "CP1250", CS_CP1250, 1 },
     { "Win1250", CS_CP1250, 0 },
     { "CP1251", CS_CP1251, 1 },
index 38b76e5..e0ace12 100644 (file)
--- a/mimeenc.c
+++ b/mimeenc.c
@@ -181,6 +181,8 @@ static const struct {
     { "866", CS_CP866 },
     { "csIBM866", CS_CP866 },
 
+    { "windows-874", CS_CP874 },       /* WILD */
+
     { "windows-1250", CS_CP1250 },
     { "win-1250", CS_CP1250 },        /* WILD */
 
index 6ec500b..5add13d 100644 (file)
--- a/sbcs.dat
+++ b/sbcs.dat
@@ -461,6 +461,27 @@ charset CS_CP866
 0440 0441 0442 0443 0444 0445 0446 0447 0448 0449 044a 044b 044c 044d 044e 044f
 0401 0451 0404 0454 0407 0457 040e 045e 00b0 2219 00b7 221a 2116 00a4 25a0 00a0
 
+  Windows-874, a Thai code page hacked up by hand from the listing at
+  http://www.microsoft.com/globaldev/reference/sbcs/874.mspx
+
+charset CS_CP874
+0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f
+0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f
+0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f
+0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f
+0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f
+0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f
+0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f
+0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f
+20ac XXXX XXXX XXXX XXXX 2026 XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX
+XXXX 2018 2019 201c 201d 2022 2013 2014 XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX
+00a0 0e01 0e02 0e03 0e04 0e05 0e06 0e07 0e08 0e09 0e0a 0e0b 0e0c 0e0d 0e0e 0e0f
+0e10 0e11 0e12 0e13 0e14 0e15 0e16 0e17 0e18 0e19 0e1a 0e1b 0e1c 0e1d 0e1e 0e1f
+0e20 0e21 0e22 0e23 0e24 0e25 0e26 0e27 0e28 0e29 0e2a 0e2b 0e2c 0e2d 0e2e 0e2f
+0e30 0e31 0e32 0e33 0e34 0e35 0e36 0e37 0e38 0e39 0e3a XXXX XXXX XXXX XXXX 0e3f
+0e40 0e41 0e42 0e43 0e44 0e45 0e46 0e47 0e48 0e49 0e4a 0e4b 0e4c 0e4d 0e4e 0e4f
+0e50 0e51 0e52 0e53 0e54 0e55 0e56 0e57 0e58 0e59 0e5a 0e5b XXXX XXXX XXXX XXXX
+
   Here are some Windows code pages, generated by this piece of
   Bourne shell: