summaryrefslogtreecommitdiff
path: root/enc
diff options
context:
space:
mode:
Diffstat (limited to 'enc')
-rw-r--r--enc/euc_jp.c3
-rw-r--r--enc/iso_8859_1.c3
-rw-r--r--enc/iso_8859_10.c1
-rw-r--r--enc/iso_8859_11.c3
-rw-r--r--enc/iso_8859_13.c1
-rw-r--r--enc/iso_8859_14.c1
-rw-r--r--enc/iso_8859_15.c1
-rw-r--r--enc/iso_8859_16.c1
-rw-r--r--enc/iso_8859_2.c3
-rw-r--r--enc/iso_8859_3.c1
-rw-r--r--enc/iso_8859_4.c3
-rw-r--r--enc/iso_8859_5.c3
-rw-r--r--enc/iso_8859_6.c3
-rw-r--r--enc/iso_8859_7.c3
-rw-r--r--enc/iso_8859_8.c3
-rw-r--r--enc/iso_8859_9.c3
-rwxr-xr-xenc/make_encdb.rb8
-rw-r--r--enc/us_ascii.c2
18 files changed, 41 insertions, 5 deletions
diff --git a/enc/euc_jp.c b/enc/euc_jp.c
index f62627e..fbf3848 100644
--- a/enc/euc_jp.c
+++ b/enc/euc_jp.c
@@ -364,3 +364,6 @@ OnigEncodingDefine(euc_jp, EUC_JP) = {
0
};
ENC_ALIAS("eucJP", "EUC-JP"); /* UI-OSF Application Platform Profile for Japanese Environment Version 1.1 */
+ENC_REPLICATE("eucJP-ms", "EUC-JP"); /* TOG/JVC CDE/Motif Technical WG */
+ENC_ALIAS("euc-jp-ms", "EUC-JP");
+ENC_REPLICATE("CP51932", "EUC-JP"); /* Windows CodePage 51932 */
diff --git a/enc/iso_8859_1.c b/enc/iso_8859_1.c
index 0c85c8b..10c68f5 100644
--- a/enc/iso_8859_1.c
+++ b/enc/iso_8859_1.c
@@ -272,3 +272,6 @@ OnigEncodingDefine(iso_8859_1, ISO_8859_1) = {
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
};
+ENC_ALIAS("ISO8859-1", "ISO-8859-1");
+ENC_REPLICATE("Windows-1252", "ISO-8859-1");
+ENC_ALIAS("CP1252", "Windows-1252");
diff --git a/enc/iso_8859_10.c b/enc/iso_8859_10.c
index 092941e..64ec45a 100644
--- a/enc/iso_8859_10.c
+++ b/enc/iso_8859_10.c
@@ -241,3 +241,4 @@ OnigEncodingDefine(iso_8859_10, ISO_8859_10) = {
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
};
+ENC_ALIAS("ISO8859-10", "ISO-8859-10");
diff --git a/enc/iso_8859_11.c b/enc/iso_8859_11.c
index ce0fee7..c95de80 100644
--- a/enc/iso_8859_11.c
+++ b/enc/iso_8859_11.c
@@ -94,3 +94,6 @@ OnigEncodingDefine(iso_8859_11, ISO_8859_11) = {
onigenc_single_byte_left_adjust_char_head,
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");
diff --git a/enc/iso_8859_13.c b/enc/iso_8859_13.c
index 0922566..9f7f121 100644
--- a/enc/iso_8859_13.c
+++ b/enc/iso_8859_13.c
@@ -230,3 +230,4 @@ OnigEncodingDefine(iso_8859_13, ISO_8859_13) = {
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
};
+ENC_ALIAS("ISO8859-13", "ISO-8859-13");
diff --git a/enc/iso_8859_14.c b/enc/iso_8859_14.c
index 0d87916..0970145 100644
--- a/enc/iso_8859_14.c
+++ b/enc/iso_8859_14.c
@@ -243,3 +243,4 @@ OnigEncodingDefine(iso_8859_14, ISO_8859_14) = {
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
};
+ENC_ALIAS("ISO8859-14", "ISO-8859-14");
diff --git a/enc/iso_8859_15.c b/enc/iso_8859_15.c
index c189252..a842ab4 100644
--- a/enc/iso_8859_15.c
+++ b/enc/iso_8859_15.c
@@ -237,3 +237,4 @@ OnigEncodingDefine(iso_8859_15, ISO_8859_15) = {
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
};
+ENC_ALIAS("ISO8859-15", "ISO-8859-15");
diff --git a/enc/iso_8859_16.c b/enc/iso_8859_16.c
index 1fdaa50..86e626c 100644
--- a/enc/iso_8859_16.c
+++ b/enc/iso_8859_16.c
@@ -239,3 +239,4 @@ OnigEncodingDefine(iso_8859_16, ISO_8859_16) = {
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
};
+ENC_ALIAS("ISO8859-16", "ISO-8859-16");
diff --git a/enc/iso_8859_2.c b/enc/iso_8859_2.c
index 57340b3..4013ed9 100644
--- a/enc/iso_8859_2.c
+++ b/enc/iso_8859_2.c
@@ -237,3 +237,6 @@ OnigEncodingDefine(iso_8859_2, ISO_8859_2) = {
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
};
+ENC_ALIAS("ISO8859-2", "ISO-8859-2");
+ENC_REPLICATE("Windowws-1250", "ISO-8859-2");
+ENC_ALIAS("CP1250", "Windows-1250");
diff --git a/enc/iso_8859_3.c b/enc/iso_8859_3.c
index 90c2636..5b0ba04 100644
--- a/enc/iso_8859_3.c
+++ b/enc/iso_8859_3.c
@@ -237,3 +237,4 @@ OnigEncodingDefine(iso_8859_3, ISO_8859_3) = {
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
};
+ENC_ALIAS("ISO8859-3", "ISO-8859-3");
diff --git a/enc/iso_8859_4.c b/enc/iso_8859_4.c
index cc103cd..d9d41f4 100644
--- a/enc/iso_8859_4.c
+++ b/enc/iso_8859_4.c
@@ -239,3 +239,6 @@ OnigEncodingDefine(iso_8859_4, ISO_8859_4) = {
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
};
+ENC_ALIAS("ISO8859-4", "ISO-8859-4");
+ENC_REPLICATE("Windows-1257", "ISO-8859-4");
+ENC_ALIAS("CP1257", "Windows-1257");
diff --git a/enc/iso_8859_5.c b/enc/iso_8859_5.c
index de7a0fd..06b91ee 100644
--- a/enc/iso_8859_5.c
+++ b/enc/iso_8859_5.c
@@ -227,3 +227,6 @@ OnigEncodingDefine(iso_8859_5, ISO_8859_5) = {
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
};
+ENC_ALIAS("ISO8859-5", "ISO-8859-5");
+ENC_REPLICATE("Windows-1251", "ISO-8859-5");
+ENC_ALIAS("CP1251", "Windows-1251");
diff --git a/enc/iso_8859_6.c b/enc/iso_8859_6.c
index c0f3027..8a91280 100644
--- a/enc/iso_8859_6.c
+++ b/enc/iso_8859_6.c
@@ -94,3 +94,6 @@ OnigEncodingDefine(iso_8859_6, ISO_8859_6) = {
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
};
+ENC_ALIAS("ISO8859-6", "ISO-8859-6");
+ENC_REPLICATE("Windows-1256", "ISO-8859-6");
+ENC_ALIAS("CP1256", "Windows-1256");
diff --git a/enc/iso_8859_7.c b/enc/iso_8859_7.c
index 2ff42ed..68d590d 100644
--- a/enc/iso_8859_7.c
+++ b/enc/iso_8859_7.c
@@ -224,3 +224,6 @@ OnigEncodingDefine(iso_8859_7, ISO_8859_7) = {
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
};
+ENC_ALIAS("ISO8859-7", "ISO-8859-7");
+ENC_REPLICATE("Windows-1253", "ISO-8859-7");
+ENC_ALIAS("CP1253", "Windows-1253");
diff --git a/enc/iso_8859_8.c b/enc/iso_8859_8.c
index e0e600c..72cfea9 100644
--- a/enc/iso_8859_8.c
+++ b/enc/iso_8859_8.c
@@ -94,3 +94,6 @@ OnigEncodingDefine(iso_8859_8, ISO_8859_8) = {
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
};
+ENC_ALIAS("ISO8859-8", "ISO-8859-8");
+ENC_REPLICATE("Windows-1255", "ISO-8859-8");
+ENC_ALIAS("CP1255", "Windows-1255");
diff --git a/enc/iso_8859_9.c b/enc/iso_8859_9.c
index f811bac..0af43fb 100644
--- a/enc/iso_8859_9.c
+++ b/enc/iso_8859_9.c
@@ -230,3 +230,6 @@ OnigEncodingDefine(iso_8859_9, ISO_8859_9) = {
onigenc_single_byte_left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match
};
+ENC_ALIAS("ISO8859-9", "ISO-8859-9");
+ENC_REPLICATE("Windows-1254", "ISO-8859-9");
+ENC_ALIAS("CP1254", "Windows-1254");
diff --git a/enc/make_encdb.rb b/enc/make_encdb.rb
index fe59676..f260a2c 100755
--- a/enc/make_encdb.rb
+++ b/enc/make_encdb.rb
@@ -13,7 +13,7 @@ encodings = []
replicas = {}
aliases = {}
encdir = ARGV[0]
-Dir.open(encdir) {|d| d.grep(/.+\.c\z/)}.each do |fn|
+Dir.open(encdir) {|d| d.grep(/.+\.c\z/)}.sort.each do |fn|
open(File.join(encdir,fn)) do |f|
orig = nil
name = nil
@@ -26,19 +26,19 @@ Dir.open(encdir) {|d| d.grep(/.+\.c\z/)}.each do |fn|
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
end
-p aliases
+
open('encdb.h', 'wb') do |f|
f.puts 'static const char *const enc_name_list[] = {'
encodings.each {|name| f.puts' "%s",' % name}
- replicas.each_key {|name| f.puts' "%s",' % name}
- aliases.each_key {|name| f.puts' "%s",' % name}
f.puts('};', '', 'static void', 'enc_init_db(void)', '{')
replicas.each_pair {|name, orig|
f.puts ' ENC_REPLICATE("%s", "%s");' % [name, orig]
diff --git a/enc/us_ascii.c b/enc/us_ascii.c
index b3ac093..165932d 100644
--- a/enc/us_ascii.c
+++ b/enc/us_ascii.c
@@ -28,4 +28,4 @@ OnigEncodingDefine(us_ascii, US_ASCII) = {
};
ENC_ALIAS("ASCII", "US-ASCII");
ENC_ALIAS("ANSI_X3.4-1986", "US-ASCII");
-
+ENC_ALIAS("646", "US-ASCII"); \ No newline at end of file