* enc/trans/utf8_mac-tbl.rb: don't use Unicode escape.

* enc/trans/utf8_mac.trans: follow above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2009-05-02 01:38:27 +00:00
Родитель e4d687f372
Коммит f207f9fd51
3 изменённых файлов: 955 добавлений и 955 удалений

Просмотреть файл

@ -1,3 +1,9 @@
Sat May 2 10:34:29 2009 NARUSE, Yui <naruse@ruby-lang.org>
* enc/trans/utf8_mac-tbl.rb: don't use Unicode escape.
* enc/trans/utf8_mac.trans: follow above.
Sat May 2 09:19:40 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* array.c (Init_Array): made #to_s an alias to #inspect to reduce

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -3,12 +3,8 @@
<%
require 'utf8_mac-tbl'
def hexstr(str)
str.unpack("H*")[0]
end
transcode_tblgen("UTF-8", "UTF8-MAC",
MAC_DECOMPOSE_TBL.map{|k,v|[hexstr(k), hexstr(v)]} + [
MAC_DECOMPOSE_TBL + [
["{00-7F}", :nomap],
["{c2-df}{80-bf}", :asis],
["e0{a0-bf}{80-bf}", :asis],
@ -31,13 +27,11 @@
map["f4{80-8f}{80-bf}{80-bf}"] = :func_so
transcode_generate_node(ActionMap.parse(map), "from_UTF8_MAC")
map = Hash[*MAC_DECOMPOSE_TBL.select{|k,v|v.length == 3}.
map{|k,v|[hexstr(v), hexstr(k)]}.flatten]
ary = MAC_DECOMPOSE_TBL.select{|k,v|v.scan(/[0-7C-F].(?:[89AB].)*/i).length == 3}
transcode_generate_node(ActionMap.parse(ary.map{|k,v|[v,k]}), "from_utf8_mac_nfc3")
transcode_generate_node(ActionMap.parse(map), "from_utf8_mac_nfc3")
map = Hash[*MAC_DECOMPOSE_TBL.select{|k,v|v.length == 2}.
map{|k,v|[hexstr(v), hexstr(k)]}.flatten]
transcode_generate_node(ActionMap.parse(map), "from_utf8_mac_nfc2")
ary = MAC_DECOMPOSE_TBL.select{|k,v|v.scan(/[0-7C-F].(?:[89AB].)*/i).length == 2}
transcode_generate_node(ActionMap.parse(ary.map{|k,v|[v,k]}), "from_utf8_mac_nfc2")
%>
<%= transcode_generated_code %>
@ -236,7 +230,7 @@ fun_so_from_utf8_mac(void *statep,
}
static const rb_transcoder
rb_from_utf8_mac = {
rb_from_UTF8_MAC = {
"UTF8-MAC", "UTF-8", from_UTF8_MAC,
TRANSCODE_TABLE_INFO,
1, /* input_unit_length */
@ -252,6 +246,6 @@ void
Init_utf8_mac(void)
{
<%= transcode_register_code %>
rb_register_transcoder(&rb_from_utf8_mac);
rb_register_transcoder(&rb_from_UTF8_MAC);
}