summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--enc/ascii.c44
-rw-r--r--enc/big5.c1
-rw-r--r--enc/iso_8859_11.c3
-rwxr-xr-xenc/make_encdb.rb36
-rw-r--r--enc/shift_jis.c2
-rw-r--r--enc/windows_1251.c2
7 files changed, 84 insertions, 10 deletions
@@ -1,3 +1,9 @@
Mon Jan 14 02:03:05 2008 NARUSE, Yui <[email protected]>
* include/ruby/oniguruma.h: remove ONIG_ENCODING_* and OnigEncoding*
@@ -48,3 +48,47 @@ OnigEncodingDefine(ascii, ASCII) = {
onigenc_always_true_is_allowed_reverse_match
};
ENC_ALIAS("BINARY", "ASCII-8BIT");
@@ -162,3 +162,4 @@ OnigEncodingDefine(big5, BIG5) = {
big5_left_adjust_char_head,
big5_is_allowed_reverse_match
};
@@ -95,5 +95,6 @@ OnigEncodingDefine(iso_8859_11, ISO_8859_11) = {
onigenc_always_true_is_allowed_reverse_match
};
ENC_ALIAS("ISO8859-11", "ISO-8859-11");
ENC_REPLICATE("Windows-874", "ISO-8859-11");
-ENC_ALIAS("CP874", "ISO-8859-11");
@@ -9,6 +9,12 @@
# ENC_ALIAS("CP932", "Windows-31J")
#
encodings = []
replicas = {}
aliases = {}
@@ -17,20 +23,34 @@ Dir.open(encdir) {|d| d.grep(/.+\.c\z/)}.sort.each do |fn|
open(File.join(encdir,fn)) do |f|
orig = nil
name = nil
f.each_line do |line|
break if /^OnigEncodingDefine/o =~ line
end
f.each_line do |line|
break if /"(.*?)"/ =~ line
end
- encodings << $1 if $1
- f.each_line do |line|
- if /^ENC_REPLICATE\(\s*"([^"]+)"\s*,\s*"([^"]+)"/o =~ line
- encodings << $1
- replicas[$1] = $2
- elsif /^ENC_ALIAS\(\s*"([^"]+)"\s*,\s*"([^"]+)"/o =~ line
- encodings << $1
- aliases[$1] = $2
end
end
end
@@ -376,3 +376,5 @@ ENC_ALIAS("SJIS", "Shift_JIS");
ENC_REPLICATE("Windows-31J", "Shift_JIS");
ENC_ALIAS("CP932", "Windows-31J");
ENC_ALIAS("csWindows31J", "Windows-31J"); /* IANA. IE6 don't accept Windows-31J but csWindows31J. */
@@ -180,7 +180,7 @@ cp1251_get_case_fold_codes_by_str(OnigCaseFoldType flag,
flag, p, end, items);
}
-OnigEncodingType OnigEncodingCP1251 = {
onigenc_single_byte_mbc_enc_len,
"Windows-1251", /* name */
1, /* max enc length */