summaryrefslogtreecommitdiff
path: root/enc/big5.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-24 16:15:53 (GMT)
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-24 16:15:53 (GMT)
commita8951a5b3a97af7f4e1a5e93c69b2cb1c892edd2 (patch)
tree7b8f5e7ced8a199080aeeed590cfaf92bea783dd /enc/big5.c
parent28862075842f6e8e62d00954a291b01ba80e61a1 (diff)
* enc/big5.c: Fix EncLen_BIG5 for Big5-HKSCS. see [ruby-core:24390]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/big5.c')
-rwxr-xr-x[-rw-r--r--]enc/big5.c52
1 files changed, 34 insertions, 18 deletions
diff --git a/enc/big5.c b/enc/big5.c
index 5b017da..7bba71e 100644..100755
--- a/enc/big5.c
+++ b/enc/big5.c
@@ -30,22 +30,23 @@
#include "regenc.h"
static const int EncLen_BIG5[] = {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 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2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ /* C */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ /* D */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ /* E */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ /* F */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
};
typedef enum { FAILURE = -2, ACCEPT = -1, S0 = 0, S1 } state_t;
@@ -195,6 +196,13 @@ big5_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED, OnigE
return (BIG5_ISMB_TRAIL(c) ? FALSE : TRUE);
}
+/*
+ * Name: Big5 (preferred MIME name)
+ * MIBenum: 2026
+ * Source: Chinese for Taiwan Multi-byte set.
+ * PCL Symbol Set Id: 18T
+ * Alias: csBig5
+ */
OnigEncodingDefine(big5, BIG5) = {
big5_mbc_enc_len,
"Big5", /* name */
@@ -213,5 +221,13 @@ OnigEncodingDefine(big5, BIG5) = {
big5_left_adjust_char_head,
big5_is_allowed_reverse_match
};
-ENC_ALIAS("CP950", "BIG5")
-ENC_REPLICATE("BIG5-HKSCS", "BIG5")
+ENC_ALIAS("CP950", "Big5")
+
+/*
+ * Name: Big5-HKSCS
+ * MIBenum: 2101
+ * Source: See (http://www.iana.org/assignments/charset-reg/Big5-HKSCS)
+ * Alias: None
+ */
+ENC_REPLICATE("Big5-HKSCS", "Big5")
+ENC_ALIAS("CP951", "Big5-HKSCS")