aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_transcode.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* enc/ebcdic.h, enc/trans/ebcdic.trans,duerst2015-12-151-4/+4
| | | | | | | | test/ruby/test_transcode.rb: Fixed encoding name to the correct one in the IANA registry (IBM037) and added an alias (ebcdic-cp-us) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2015-12-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/ebcdic.h: new dummy encoding EBCDIC-USduerst2015-12-141-0/+7
| | | | | | | | | | * enc/trans/ebcdic.trans: transcodings between EBCDIC-US and iso-8859-1 [with code from Andrea Ribuoli] * test/ruby/test_transcode.rb: tests for above * tool/transcode_tablegen.rb: additional argument for method transcode_tblgen git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* transcode.c: empty encoding namenobu2015-07-031-0/+9
| | | | | | | * transcode.c (rb_econv_set_replacement): target encoding name can be empty now. [ruby-core:69841] [Bug #11324] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* transcode.c: fix race conditionnobu2015-06-261-0/+18
| | | | | | | * transcode.c (load_transcoder_entry): fix transcoder loading race condition, by waiting in require. [ruby-dev:49106] [Bug #11277] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/lib/envutil.rb: Moved from test/ruby/.akr2014-11-131-1/+1
| | | | | | | | | | | | | | * test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_transcode.rb: add messagesnobu2014-01-011-4/+4
| | | | | | | * test/ruby/test_transcode.rb (test_valid_dummy_encoding): add assertion messages and suppress a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.c: mask dummy flagsnobu2013-12-301-0/+11
| | | | | | | * encoding.c (must_encindex, rb_enc_from_index, rb_obj_encoding): mask encoding index and ignore dummy flags. [ruby-core:59354] [Bug #9314] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (str_transcode0): don't scrub invalid chars ifnaruse2013-11-221-0/+9
| | | | | | | str.encode doesn't have explicit invalid: :replace. workaround fix for see #8995 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_transcode.rb: base encodingnobu2013-09-231-0/+1
| | | | | | | * test/ruby/test_transcode.rb (TestTranscode#test_pseudo_encoding_inspect): test for proper base encoding. [ruby-core:57318] [Bug #8940] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encdb.c, utf_16_32.h: Unicode with BOMnobu2013-09-231-0/+7
| | | | | | | | * enc/encdb.c, enc/utf_16_32.h (ENC_DUMMY_UNICODE): Unicode with BOM must be based on big endian variants, so that actual encodings would work. [ruby-core:57318] [Bug #8940] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/utf8_mac-tbl.rb: fix r42789.naruse2013-09-041-4/+6
| | | | | | Fix conversion table and logic. [ruby-dev:47680] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Suppress warnings: setting Encoding.default_internalnaruse2013-06-021-10/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/japanese_euc.trans, test/ruby/test_transcode.rb,ktsj2013-06-021-60/+60
| | | | | | | tool/transcode-tblgen.rb: change EUC-JP-2004 to EUC-JIS-2004. This is follow up to changes in r41024. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Added a test for CoW strings.tenderlove2012-08-231-0/+26
| | | | | | | by John Shahid <jvshahid@gmail.com> https://github.com/ruby/ruby/pull/148 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/euc_jp.c: added EUC-JP-2004 and its alias EUC-JISX0213.usa2012-04-241-0/+69
| | | | | | | | | | | | | | | | | | | | [ruby-dev:45571] [Feature #6349] Requested by Kyouhei Yanagita <yanagi@shakenbu.org>. * enc/trans/japanese_euc.trans: ditto. * enc/trans/JIS/JISX0213-[12]%UCS@{BMP,SIP}.src: JIS X 0213:2004 -> Unicode mapping table from NetBSD. * enc/trans/JIS/UCS@{BMP,SIP}%JISX0213-[12].src: Unicode -> JIX X 0213:2004 mapping table from NetBSD. * tool/transcode-tblgen.rb: added SIP support. * test/ruby/test_transcode.rb: tests of above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_transcode.rb (TestTranscode#test_Big5_Hkscs): fixnobu2011-06-101-1/+1
| | | | | | indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_transcode.rb (test_from_cp50221): fix wrongnobu2011-02-111-1/+2
| | | | | | assertion and move back. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby: uniquify test names.nobu2011-02-111-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (transcode_loop): call default handler of the givennobu2010-12-071-0/+17
| | | | | | | hash, method, proc or [] method as fallback. [ruby-dev:42692] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_transcode.rb (test_unicode_public_review_issue_121):duerst2010-11-291-4/+6
| | | | | | | | | - Removed commented-out options that are no longer under discussion. - Added two more tests for forthcomming clarifications. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos.nobu2010-11-251-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/utf_16_32.trans: add the UTF-32 converter.naruse2010-11-241-0/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_transcode.rb: ASCII-8BIT is not a valid encoding name in Emacs.nobu2010-11-231-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/utf_16_32.trans: add a convert from UTF-8 to UTF-16.naruse2010-11-231-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/utf_16_32.trans: raise error on unpaired uppernaruse2010-11-231-0/+2
| | | | | | surrogates. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/utf_16_32.h: add UTF-16 and UTF-32 as a dummy encoding.naruse2010-11-231-0/+6
| | | | | | * 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
* * enc/big5.c: split CP950 from Big5.naruse2010-11-221-5/+5
| | | | | | | | | | | | | * 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
* * enc/trans/utf8_mac.trans (buf_apply): fix for patternsnaruse2010-06-121-0/+10
| | | | | | 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
* * enc/iso_2022_jp.h: add CP50220.naruse2010-05-171-0/+9
| | | | | | * 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
* * transcode.c (transcode_loop): insert output the value whennaruse2010-04-131-2/+10
| | | | | | | | | | fallback hash has a related key. [ruby-dev:40540] [ruby-dev:40829] #3036 * transcode.c (rb_econv_prepare_opts): pass to newhash a value with the key :fallback. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/iso2022.trans: CP50221 supports 8bit JIS.naruse2010-04-011-0/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: suppress warnings.akr2010-01-251-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode_data.h, transcode.c, tool/transcode-tblgen.rb: Addedduerst2009-12-101-3/+3
| | | | | | | | | | | | 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
* * enc/trans/gb18030-tbl.rb: Fix omission of C1 region in code tableduerst2009-12-031-2/+8
| | | | | | | | | | (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
* * enc/big5.c, enc/trans/big5.trans, enc/trans/big5-uao-tbl.rb,duerst2009-11-171-1/+6
| | | | | | | | 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
* * transcode.c: added check for frozen string for encode! (see Bug #1836)duerst2009-07-301-0/+2
| | | | | | | * test/ruby/test_transcode.rb: added tests for the above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/big5.trans, big5-hkscs-tbl.rb:duerst2009-07-241-0/+68
| | | | | | | | | | | | | | | | 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
* * {ext,lib,test}/**/*.rb: removed trailing spaces.nobu2009-03-061-88/+88
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Recover default_default_internal.naruse2009-01-221-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add test for String#encode.naruse2009-01-211-0/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/gb18030.trans, gb18030-tbl.rb:duerst2009-01-141-0/+156
| | | | | | | | | | | | | | | 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
* * enc/trans/gbk.trans, gbk-tbl.rb:duerst2009-01-041-0/+114
| | | | | | | | | | 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
* * test/ruby/test_transcode.rb: added tests for GB2312duerst2009-01-041-1/+49
| | | | | | | | | | (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
* * enc/trans/big5.trans, big5-tbl.rb:duerst2009-01-041-0/+67
| | | | | | | | | | 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
* * transcode.c (str_transcode0): set encoding when String#encode wasnaruse2008-12-251-0/+1
| | | | | | given explicit but the same destination and source encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/single_byte.trans, cp850-tbl.rb, cp852-tbl.rb,duerst2008-12-091-32/+160
| | | | | | | | | | | 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
* * test/ruby/test_transcode.rb: unnecessary setup methodduerst2008-11-111-15/+0
| | | | | | | (setup_really_needed?) removed git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/single_byte.trans, macgreek-tbl.rb, macroman-tbl.rb,duerst2008-11-111-0/+347
| | | | | | | | | | | | | | 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