summaryrefslogtreecommitdiff
path: root/enc/big5.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-24 16:15:53 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-24 16:15:53 +0000
commita8951a5b3a97af7f4e1a5e93c69b2cb1c892edd2 ()
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
-rwxr-xr-x[-rw-r--r--]enc/big5.c52
1 files changed, 34 insertions, 18 deletions
@@ -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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 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);
}
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")