akr
113de0083e
* enc/trans/utf8_mac.trans: parenthesize macro arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-04 10:14:53 +00:00
naruse
b98ea1505c
* enc/trans/big5-hkscs-tbl.rb: Update table as HKSCS-2008.
...
patched by oCameLo oTnTh [ruby-core:33256]
* enc/big5.c: add alias Big5-HKSCS:2008 to Big5-HKSCS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-24 16:40:38 +00:00
naruse
38b482be8c
* enc/trans/utf_16_32.trans: add the UTF-32 converter.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-24 00:08:04 +00:00
naruse
7f38397b6c
* enc/trans/utf_16_32.trans: add a convert from UTF-8 to UTF-16.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-23 20:49:56 +00:00
naruse
3ab82a65d7
* enc/trans/utf_16_32.trans: raise error on unpaired upper
...
surrogates.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-23 18:23:03 +00:00
naruse
78bee9c26a
* enc/utf_16_32.h: add UTF-16 and UTF-32 as a dummy encoding.
...
* enc/trans/utf_16_32.trans: add a converter from UTF-16 to UTF-8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-23 16:42:47 +00:00
naruse
5d8a64b1af
Add missing tables.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-22 11:35:55 +00:00
naruse
60dfa6b655
* enc/big5.c: split CP950 from Big5.
...
* enc/big5.c: split CP951 from Big5-HKSCS.
* enc/trans/big5.trans: import conversion table of Big5, Big5-HKSCS,
CP950, and CP951 from ICU. they need fallback conversions.
ref [ruby-core:33256]
http://source.icu-project.org/repos/icu/data/trunk/charset/data/ucm/
* tool/transcode-tblgen.rb (import_ucm): add to import ucm files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-22 09:35:08 +00:00
naruse
7b5e9245ac
* enc/trans/gbk-tbl.rb: Add euro sign. [ruby-core:33094]
...
CP936, which is de facto definition of GBK, has it.
http://msdn.microsoft.com/en-us/goglobal/cc305153.aspx
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-08 00:50:13 +00:00
naruse
78f5b54f1b
* enc/trans/utf8_mac.trans (buf_apply): fix for patterns
...
whose result is 2 bytes. [ruby-core:30751]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-12 17:13:54 +00:00
naruse
f8d97b0026
* enc/iso_2022_jp.h: add CP50220.
...
* enc/trans/iso2022.trans: add converter for CP50220.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17 06:28:16 +00:00
naruse
afd64aafd1
* enc/trans/iso2022.trans: CP50221 supports 8bit JIS.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-01 08:18:38 +00:00
muraken
e4d8dc5c46
* bignum.c, node.h, strftime.c, enc/trans/utf8_mac.trans: added explicit casts for supplessing warnings.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-25 03:08:28 +00:00
akr
49d993729f
* tool/transcode-tblgen.rb (transcode_compile_tree): make
...
valid_encoding mandatory unless from_encoding is registered in
ValidEncoding.
(transcode_tbl_only): ditto.
(transcode_tblgen): ditto.
(ValidEncoding): new function.
* enc/trans/escape.trans: specify valid_encoding.
* enc/trans/emoji_sjis_docomo.trans: ditto.
* enc/trans/emoji.trans: ditto.
* enc/trans/emoji_iso2022_kddi.trans: ditto.
* enc/trans/big5.trans: ditto.
* enc/trans/emoji_sjis_softbank.trans: ditto.
* enc/trans/emoji_sjis_kddi.trans: ditto.
* enc/trans/chinese.trans: use ValidEncoding() instead of
ValidEncoding[].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-21 03:38:58 +00:00
muraken
04d90693dc
* enc/trans/emoji.trans: added codepoints leading 0xf4 into nomap_table.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-16 11:18:03 +00:00
akr
a73374bb57
* tool/transcode-tblgen.rb (transcode_tblgen): add valid_encoding
...
optional argument.
* enc/trans/single_byte.trans use valid_encoding argument for
transcode_tblgen.
* enc/trans/chinese.trans: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-15 12:25:20 +00:00
akr
ff39d22c33
* enc/trans/emoji.trans: fix nomap_table.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-14 06:49:22 +00:00
akr
fa37ab769f
* tool/transcode-tblgen.rb: reject ambiguous mapping.
...
* enc/trans/single_byte.trans: remove ambiguous maping such as
\xD6 -> U+05F2 and \xD6\xC7 -> U+FB1F in Windows-1255
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-13 17:54:43 +00:00
muraken
62f8df2d3c
* enc/trans/EMOJI/*.src, enc/trans/emoji*, enc/x-emoji.c, test/ruby/enc/test_emoji.rb, tool/enc-emoji-citrus-gen.rb, tool/enc-emoji4unicode.rb, tool/jisx0208.rb, tool/test/test_jisx0208.rb: new encodings to support emoji charsets, which are used by Japanese mobile phones [ruby-dev:40528]. Thanks Yoji Shidara for a lot of contribution.
...
* tool/transcode-tblgen.rb: modified for enc-emoji4unicode.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-09 09:15:42 +00:00
naruse
6899b6ff80
* enc/trans/utf8_mac.trans (buf_shift_char): don't see uninitialised
...
value. [ruby-dev:40233]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-29 00:56:10 +00:00
duerst
b32ee85f97
* transcode_data.h, transcode.c, tool/transcode-tblgen.rb: Added
...
support for new transcoding instruction FUNsio (with Tatsuya Mizuno)
* enc/trans/gb18030.trans: Significantly reduced GB18030 conversion
table footprint using FUNsio and differences (with Tatsuya Mizuno)
* test/ruby/test_transcode.rb: Minor name fix (from Tatsuya Mizuno)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-10 11:59:12 +00:00
duerst
9998481d4e
* enc/trans/gb18030-tbl.rb: Fix omission of C1 region in code table
...
(from Tatsuya Mizuno)
* test/ruby/test_transcode.rb: Added test for converting full range of
Unicode codepoints from/to GB18030 (from Tatsuya Mizuno)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-03 11:29:33 +00:00
akr
cc128e3ecf
* enc/trans/newline.trans (fun_so_universal_newline): generate \n
...
after \r\n detection instead of just after \r.
[ruby-list:45988] [ruby-core:25881] [ruby-core:26788]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-22 19:15:55 +00:00
duerst
e0436c54c2
* enc/big5.c, enc/trans/big5.trans, enc/trans/big5-uao-tbl.rb,
...
test/ruby/test-transcode.rb: Added Encoding 'Big5-UAO' and transcoding
for it (from Tatsuya Mizuno) (see Bug #1784 )
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-17 08:56:11 +00:00
duerst
2886207584
* enc/trans/big5.trans, big5-hkscs-tbl.rb:
...
new Chinese BIG5-HKSCS transcoding (with Tatsuya Mizuno)
* test/ruby/test_transcode.rb: added tests for the above
(with Tatsuya Mizuno)
* enc/big5.c: Added BIG5-HKSCS as a replicate encoding of BIG5
(short term solution, needs more work; with Tatsuya Mizuno)
* tool/transcode-tblgen.rb: made 'pat' directly accessible in
class StrSet
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-24 10:26:18 +00:00
naruse
d9cf0f822f
* enc/trans/utf8_mac.trans: remove wrong optimization.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-13 18:55:55 +00:00
naruse
3abca796f4
Fix: DON'T move in_p because before in_p is replaced by buffered data.
...
* transcode.c: NOMAP is now multibyte direct map.
* transcode.c: remove ASIS.
* transcode_data.h: ditto.
* tool/transcode-tb (ActionMap#generate_info): remove :asis.
* tool/transcode-tb (ActionMap#generate_info): add :nomap0.
* enc/trans/utf8_mac.trans: replace :asis by :nomap0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-05 00:05:11 +00:00
naruse
f207f9fd51
* 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
2009-05-02 01:38:27 +00:00
nobu
8543ecee53
* enc/trans/utf8_mac.trans: get rid of a 1.9 feature for cross
...
compile.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-30 06:27:51 +00:00
naruse
80705b9fbf
Add new transcoder: CP51932 <-> CP50221.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-29 12:50:57 +00:00
naruse
d0a4f8ada9
* enc/trans/utf8_mac.trans: Add converter for UTF8-MAC.
...
* enc/trans/utf8_mac-tbl.rb: ditto.
* test/ruby/test_econv.rb: tests for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-26 14:21:43 +00:00
nobu
e24346d6c6
* enc/trans/gb18030.trans: get rid of a 1.9 feature for cross
...
compile. [ruby-core:21345]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-14 15:06:19 +00:00
duerst
82c673d3a1
* enc/trans/gb18030.trans, gb18030-tbl.rb:
...
new Chinese GB18030 transcoding (from Yoshihiro Kambayashi)
* test/ruby/test_transcode.rb: added tests for the above
(from Yoshihiro Kambayashi)
* transcode_data.h, transcode.c, tool/transcode_tblgen.rb:
added support for GB18030-specific 4-byte sequences
(with Yoshihiro Kambayashi)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-14 11:12:30 +00:00
nobu
e668e36b49
* template/{encdb,transdb}.h.tmpl: moved enc/make_encdb.rb and
...
enc/trans/make_transdb.rb using tool/generic_erb.rb.
* common.mk (encdb.h, transdb.h): generates from avobe template.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-13 09:05:29 +00:00
nobu
4cb8d3316a
* enc/trans/make_transdb.rb (converters): should not depend on the
...
hash order for cross compile.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-13 08:28:14 +00:00
duerst
deeade6f3e
* enc/trans/gbk.trans, gbk-tbl.rb:
...
new Chinese GBK transcoding (from Yoshihiro Kambayashi)
* test/ruby/test_transcode.rb: added tests for the above
(from Yoshihiro Kambayashi)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 09:12:14 +00:00
duerst
fecce9e5e5
* test/ruby/test_transcode.rb: added tests for GB2312
...
(from Yoshihiro Kambayashi)
* enc/trans/chinese.trans: set valid byte patterns for
GB2312 and GB12345
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 08:55:04 +00:00
duerst
3bc30f0b73
* enc/trans/big5.trans, big5-tbl.rb:
...
new Chinese Big5 transcoding (from Yoshihiro Kambayashi)
* test/ruby/test_transcode.rb: added tests for the above
(from Yoshihiro Kambayashi)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 08:40:26 +00:00
naruse
1240916075
change encoding name.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-03 14:12:39 +00:00
naruse
2920aaa2d1
* enc/trans/chinese.trans: added for transcoding EUC-CN and GB12345.
...
* enc/trans/GB/: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-03 06:31:05 +00:00
duerst
a28fdecda7
* enc/trans/single_byte.trans, cp850-tbl.rb, cp852-tbl.rb,
...
cp855-tbl.rb, koi8-r-tbl.rb, koi8-u-tbl.rb, tis-620-tbl.rb:
new single-byte transcodings (from Yoshihiro Kambayashi)
* test/ruby/test_transcode.rb: added tests for the above
(from Yoshihiro Kambayashi), small cosmetic fixes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-09 09:39:25 +00:00
duerst
831e804388
* enc/trans/single_byte.trans, macgreek-tbl.rb, macroman-tbl.rb,
...
macromania-tbl.rb, macturkish-tbl.rb, macukraine-tbl.rb,
ibm437-tbl.rb, ibm852-tbl.rb, ibm855-tbl.rb, ibm857-tbl.rb,
ibm860-tbl.rb, ibm861-tbl.rb, ibm862-tbl.rb, ibm863-tbl.rb,
ibm865-tbl.rb, ibm866-tbl.rb, ibm869-tbl.rb, ibm775-tbl.rb:
new single-byte transcodings (from Yoshihiro Kambayashi)
* test/ruby/test_transcode.rb: added tests for the above
(from Yoshihiro Kambayashi)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-11 05:26:20 +00:00
duerst
d37df9fb13
* enc/trans/single_byte.trans, maccroatioan-tbl.rb,
...
maccyrillic-tbl.rb, maciceland-tbl.rb: new single-byte
transcodings (from Yoshihiro Kambayashi)
* test/ruby/test_transcode.rb: added tests for the above
(from Yoshihiro Kambayashi)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-31 09:07:21 +00:00
duerst
6fd14ccae5
* enc/trans/single_byte.trans: refactoring to make it easier
...
to add more transcodings (with Yoshihiro Kambayashi)
* enc/trans/iso-8859-1-tbl.rb: new file to avoid having to
treat ISO-8859-1 as special
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-30 05:47:01 +00:00
duerst
b014f1bc02
* enc/trans/single_byte.trans: adding WINDOWS-wwww encodings
...
(wwww = 874/1250/1251/1253/1254/1255/1256/1257)
(contributed by Yoshihiro Kambayashi)
* enc/trans/windows-wwww-tbl.rb: 8 new files
(contributed by Yoshihiro Kambayashi)
* test/ruby/test_transcode.rb: added test_windows_wwww
(contributed by Yoshihiro Kambayashi)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-19 09:15:37 +00:00
duerst
7adbfbb793
* tool/transcode-tblgen.rb: added set_valid_byte_pattern
...
to reduce coupling between table generation script and
specific encodings.
* enc/trans/single_byte.trans: using set_valid_byte_pattern
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 08:10:57 +00:00
akr
b968fa97f6
* enc/trans/single_byte.trans (transcode_tblgen_singlebyte): renamed
...
from transcode_tblgen_windows.
(transcode_tblgen_iso8859): use transcode_tblgen_singlebyte.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 11:33:17 +00:00
duerst
48a303c027
* enc/trans/single_byte.trans: added windows-1252
...
* enc/trans/windows-1252-tbl.rb: new file
(contributed by Yoshihiro Kambayashi)
* tool/transcode-tblgen.rb: listed windows-1252 as '1byte'
* test/ruby/test_transcode.rb: added test_windows_1252
(contributed by Yoshihiro Kambayashi)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 04:37:10 +00:00
akr
0675246ba6
* transcode_data.h (rb_transcoder): resetsize_func and resetstate_func
...
also returns ssize_t.
* enc/trans/iso2022.trans: follow the type change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-15 02:11:50 +00:00
akr
c767be3039
* transcode_data.h: return output functions ssize_t.
...
* transcode.c (transcode_restartable0): don't need to cast the result
of output functions.
* enc/trans/newline.trans: follow the type change.
* enc/trans/escape.trans: ditto.
* enc/trans/utf_16_32.trans: ditto.
* enc/trans/iso2022.trans: ditto.
* enc/trans/japanese.trans: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-14 18:35:17 +00:00