summaryrefslogtreecommitdiffstats
path: root/enc
Commit message (Collapse)AuthorAgeFilesLines
* merges r25883 from trunk into ruby_1_9_1. fixes a backpor task #2168.yugui2009-12-051-11/+15
| | | | | | | | | -- * 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@26015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merges r23813 and r23821 from trunk into ruby_1_9_1.yugui2009-06-241-1/+1
| | | | | | | | -- * ruby.c (process_options), enc/prelude.rb: encdb and transdb are extension libraries. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@23841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merges r23035 from trunk into ruby_1_9_1.yugui2009-04-191-2/+9
| | | | | | | | -- * enc/depend (link_so): replaces $(TARGET) with basename of the target. [ruby-talk:330286] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@23222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merges r21892 from trunk into ruby_1_9_1.yugui2009-01-301-11/+4
| | | | | | * enc/depend: extract comile rules to each target for VC++. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@21894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merges r21509 and r21512 from trunk into ruby_1_9_1.yugui2009-01-152-0/+63414
| | | | | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@21560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merges r21490 from trunk into ruby_1_9_1.yugui2009-01-152-138/+0
| | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@21551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merges r21489 from trunk into ruby_1_9_1.yugui2009-01-151-1/+5
| | | | | | | * enc/trans/make_transdb.rb (converters): should not depend on the hash order for cross compile. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@21550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merges r21315 from trunk into ruby_1_9_1.yugui2009-01-042-0/+21809
| | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@21326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merges r21314 from trunk into ruby_1_9_1.yugui2009-01-041-0/+3
| | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@21325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merges r21313 from trunk into ruby_1_9_1.yugui2009-01-042-0/+13721
| | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@21324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merges r21282, r21283, r21285 from trunk into ruby_1_9_1.yugui2009-01-045-0/+30331
| | | | | | | | | | | | * enc/trans/euc-cn.c: renemed from gb2312.c because GB2312 is the name of a CSS. it's encoding name is "EUC-CN". -- * enc/trans/chinese.trans: added for transcoding EUC-CN and GB12345. * enc/trans/GB/: ditto. -- change encoding name. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@21316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merges r20599 from trunk into ruby_1_9_1.yugui2008-12-137-0/+745
| | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@20689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merges r20582 from trunk into ruby_1_9_1.yugui2008-12-122-3/+9
| | | | | | * enc/depend (clean-srcs): split out from clean. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@20674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merges r20241 from trunk into ruby_1_9_1.yugui2008-11-182-1/+7
| | | | | | * enc/depend (LIBS): fixed for disable-shared. [ruby-dev:37103] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@20268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merges r20178 from trunk into ruby_1_9_1.yugui2008-11-1118-0/+2210
| | | | | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@20207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merged r20075 from trunk into ruby_1_9_1.yugui2008-10-314-0/+391
| | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@20083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merges r20054 and r20055 from trunk into ruby_1_9_1.yugui2008-10-302-54/+135
| | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@20063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/us_ascii.c (us_ascii_mbc_enc_len): made static. a patch bynobu2008-10-241-1/+1
| | | | | | | Tadashi Saito <shiba AT mail2.accsnet.ne.jp> at [ruby-dev:36916] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/single_byte.trans: adding WINDOWS-wwww encodingsduerst2008-10-199-0/+994
| | | | | | | | | | | | | | (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: http://svn.ruby-lang.org/repos/ruby/trunk@19846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/transcode-tblgen.rb: added set_valid_byte_patternduerst2008-10-181-0/+1
| | | | | | | | | | to reduce coupling between table generation script and specific encodings. * enc/trans/single_byte.trans: using set_valid_byte_pattern git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk, enc/depend (enc, trans): targets for sources.nobu2008-10-161-1/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/single_byte.trans (transcode_tblgen_singlebyte): renamedakr2008-10-141-11/+4
| | | | | | | | from transcode_tblgen_windows. (transcode_tblgen_iso8859): use transcode_tblgen_singlebyte. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/single_byte.trans: added windows-1252duerst2008-10-142-0/+136
| | | | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@19778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * grapheme cluster implementation reverted. [ruby-dev:36375]akr2008-09-1815-745/+84
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos.akr2008-09-161-7/+7
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h (OnigEncodingTypeST): add precise_retakr2008-09-1615-84/+745
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument for mbc_to_code. (ONIGENC_MBC_TO_CODE): provide NULL for precise_ret. (ONIGENC_MBC_PRECISE_CODEPOINT): defined. * include/ruby/encoding.h (rb_enc_mbc_precise_codepoint): defined. * regenc.h (onigenc_single_byte_mbc_to_code): precise_ret argument added. (onigenc_mbn_mbc_to_code): ditto. * regenc.c (onigenc_single_byte_mbc_to_code): precise_ret argument added. (onigenc_mbn_mbc_to_code): ditto. * string.c (count_utf8_lead_bytes_with_word): removed. (str_utf8_nth): removed. (str_utf8_offset): removed. (str_strlen): UTF-8 codepoint oriented optimization removed. (rb_str_substr): ditto. (enc_succ_char): use rb_enc_mbc_precise_codepoint. (enc_pred_char): ditto. (rb_str_succ): ditto. * encoding.c (rb_enc_ascget): check length with rb_enc_mbc_precise_codepoint. (rb_enc_codepoint): use rb_enc_mbc_precise_codepoint. * regexec.c (string_cmp_ic): add text_end argument. (match_at): check end of character after exact string matches. * enc/utf_8.c (graphme_table): defined for extended graphme cluster boundary. (grapheme_cmp): defined. (get_grapheme_properties): defined. (grapheme_boundary_p): defined. (MAX_BYTES_LENGTH): defined. (comb_char_enc_len): defined. (mbc_to_code0): extracted from mbc_to_code. (mbc_to_code): use mbc_to_code0. (left_adjust_combchar_head): defined. (utf_8): use a extended graphme cluster as a unit. * enc/unicode.c (onigenc_unicode_mbc_case_fold): use ONIGENC_MBC_PRECISE_CODEPOINT to extract codepoints. (onigenc_unicode_get_case_fold_codes_by_str): ditto. * enc/euc_jp.c (mbc_to_code): follow mbc_to_code field change. use onigenc_mbn_mbc_to_code. * enc/shift_jis.c (mbc_to_code): ditto. * enc/emacs_mule.c (mbc_to_code): ditto. * enc/gbk.c (gbk_mbc_to_code): follow mbc_to_code field and onigenc_mbn_mbc_to_code change. * enc/cp949.c (cp949_mbc_to_code): ditto. * enc/big5.c (big5_mbc_to_code): ditto. * enc/euc_tw.c (euctw_mbc_to_code): ditto. * enc/euc_kr.c (euckr_mbc_to_code): ditto. * enc/gb18030.c (gb18030_mbc_to_code): ditto. * enc/utf_32be.c (utf32be_mbc_to_code): follow mbc_to_code field change. * enc/utf_16be.c (utf16be_mbc_to_code): ditto. * enc/utf_32le.c (utf32le_mbc_to_code): ditto. * enc/utf_16le.c (utf16le_mbc_to_code): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode_data.h (rb_transcoder): resetsize_func and resetstate_funcakr2008-09-151-1/+1
| | | | | | | | | | also returns ssize_t. * enc/trans/iso2022.trans: follow the type change. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode_data.h: return output functions ssize_t.akr2008-09-145-19/+19
| | | | | | | | | | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@19351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode_data.h: output function takes output buffer size.akr2008-09-145-19/+19
| | | | | | | | | | | | | | | | | | * transcode.c: give output buffer size for 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: http://svn.ruby-lang.org/repos/ruby/trunk@19350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h (OnigEncodingTypeST): add end argument forakr2008-09-1314-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | left_adjust_char_head. (ONIGENC_LEFT_ADJUST_CHAR_HEAD): add end argument. (onigenc_get_left_adjust_char_head): ditto. * include/ruby/encoding.h (rb_enc_left_char_head): add end argument. * regenc.h (onigenc_single_byte_left_adjust_char_head): ditto. * regenc.c (onigenc_get_right_adjust_char_head): follow the interface change. (onigenc_get_right_adjust_char_head_with_prev): ditto. (onigenc_get_prev_char_head): ditto. (onigenc_step_back): ditto. (onigenc_get_left_adjust_char_head): ditto. (onigenc_single_byte_code_to_mbc): ditto. * re.c: ditto. * string.c: ditto. * io.c: ditto. * regexec.c: ditto. * enc/euc_jp.c: ditto. * enc/cp949.c: ditto. * enc/shift_jis.c: ditto. * enc/gbk.c: ditto. * enc/big5.c: ditto. * enc/euc_tw.c: ditto. * enc/euc_kr.c: ditto. * enc/emacs_mule.c: ditto. * enc/gb18030.c: ditto. * enc/utf_8.c: ditto. * enc/utf_16le.c: ditto. * enc/utf_16be.c: ditto. * enc/utf_32le.c: ditto. * enc/utf_32be.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/escape.trans: transcoder name renamed to use underscore.akr2008-09-121-4/+4
| | | | | | | | * transcode.c: follow the renaming. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h (OnigCodePoint): unsigned long to unsigned int.naruse2008-09-112-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/ruby/encoding.h (rb_enc_codepoint): ditto. * encoding.c (rb_enc_codepoint): signed int to unsigned int. * encoding.c (rb_enc_ascget): ditto. * string.c (rb_str_casecmp): ditto. * string.c (enc_succ_alnum_char): ditto. * string.c (rb_str_inspect): ditto. * string.c (rb_str_upcase_bang): ditto. * string.c (rb_str_downcase_bang): ditto. * string.c (rb_str_capitalize_bang): ditto. * string.c (rb_str_swapcase_bang): ditto. * string.c (struct tr): ditto. * string.c (trnext): ditto. * string.c (tr_trans): ditto. * string.c (tr_setup_table): ditto. * string.c (tr_find): ditto. * string.c (rb_str_delete_bang): ditto. * string.c (rb_str_squeeze_bang): ditto. * string.c (rb_str_count): ditto. * string.c (rb_str_split_m): ditto. * string.c (rb_str_each_line): ditto. * string.c (rb_str_lstrip_bang): ditto. * string.c (rb_str_rstrip_bang): ditto. * string.c (rb_str_intern): ditto. * dir.c (char_casecmp): ditto. * sprintf.c (rb_str_format): ditto. * enc/emacs_mule.c (mbc_to_code): to be 32bit clean. * enc/emacs_mule.c (code_to_mbc): ditto. * enc/gb18030.c (mbc_to_code): ditto. * enc/gb18030.c (code_to_mbc): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/newline.trans (rb_universal_newline): swap src_encodingakr2008-09-091-2/+1
| | | | | | | | | | | | and dst_encoding. * transcode.c (rb_econv_decorate_at): call get_transcoder_entry only once. (rb_econv_binmode): follow universal_newline change. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (rb_econv_asciicompat_encoding): renamedakr2008-09-085-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from rb_econv_stateless_encoding to apply stateless ASCII incompatible encodings such as UTF-16BE. * io.c (make_writeconv): use rb_econv_asciicompat_encoding. * transcode_data.h (rb_transcoder_asciicompat_type_t): renamed from rb_transcoder_stateful_type_t. (rb_transcoder): use rb_transcoder_asciicompat_type_t. * transcode.c: follow the type change. (asciicompat_encoding_i): renamed from stateless_encoding_i. (rb_econv_asciicompat_encoding): renamed from rb_econv_stateless_encoding. (econv_s_asciicompat_encoding): method renamed. * tool/transcode-tblgen.rb: follow the type change. * enc/trans/utf_16_32.trans: follow the type change. rb_from_UTF_16BE to UTF-8 is asciicompat_decoder. rb_from_UTF_16LE to UTF-8 is asciicompat_decoder. rb_from_UTF_32BE to UTF-8 is asciicompat_decoder. rb_from_UTF_32LE to UTF-8 is asciicompat_decoder. UTF-8 to rb_to_UTF_16BE is asciicompat_encoder. UTF-8 to rb_to_UTF_16LE is asciicompat_encoder. UTF-8 to rb_to_UTF_32BE is asciicompat_encoder. UTF-8 to rb_to_UTF_32LE is asciicompat_encoder. * enc/trans/newline.trans: follow the type change. universal newline decoder is asciicompat_converter. * enc/trans/escape.trans: follow the type change. * enc/trans/iso2022.trans: ditto. * enc/trans/japanese.trans: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/iso2022.trans: upcase to iso-2022-jp.akr2008-09-072-5/+5
| | | | | | | | * enc/emacs_mule.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/iso2022.trans: stateless-iso-2022-jp is defined to avoidakr2008-09-072-40/+123
| | | | | | | | | | | undefined conversion error between iso-2022-jp and the corresponding stateless encoding. * enc/emacs_mule.c: replicate emacs-mule as stateless-iso-2022-jp. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/escape.trans (hexstr): renamed from str1.akr2008-09-071-9/+9
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/escape.trans: use transcode_tblgen.akr2008-09-071-58/+20
| | | | | | | | * tool/transcode-tblgen.rb: generate an empty line after str1. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode_data.h (STR1): defined for a string up to 255 bytes.akr2008-09-071-51/+15
| | | | | | | | | | | | | | | | (STR1_BYTEINDEX): defined. (makeSTR1): defined. * tool/transcode-tblgen.rb: generate STR1. * transcode.c (transcode_restartable0): interpret STR1. * enc/trans/escape.trans (fun_so_escape_xml_chref): removed. STR1 is used instead. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (ECONV_XML_ATTR_CONTENT_ENCODER): defined.akr2008-09-071-24/+35
| | | | | | | | | | | | | | | | | | | | (ECONV_STATEFUL_ENCODER_MASK): defined. (ECONV_XML_ATTR_QUOTE_ENCODER): defined. (ECONV_XML_ATTR_ENCODER): removed. * enc/trans/escape.trans (rb_escape_xml_attr_content): defined. (rb_escape_xml_attr_quote): defined. (rb_escape_xml_attr): removed. * io.c (NEED_WRITECONV): writeconv is required if supplemental converter is used. (make_writeconv): apply stateful encoder in writeconv. * transcode.c: follow the constant change. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (ECONV_XML_TEXT_ENCODER): renamed fromakr2008-09-061-25/+25
| | | | | | | | | | | | | ECONV_HTML_TEXT_ENCODER. (ECONV_XML_ATTR_ENCODER): renamed from ECONV_HTML_ATTR_ENCODER. * enc/trans/escape.trans: follow the renaming. * transcode.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/escape.trans (fun_so_escape_html_attr): fix return type.akr2008-09-061-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/escape.trans (escape_html_attr_init): new function.akr2008-09-061-9/+57
| | | | | | | | | | (fun_so_escape_html_attr): new function. (escape_html_attr_finish): new function. (rb_escape_html_attr): use them to quote the converted result. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/escape.trans: new file.akr2008-09-051-0/+109
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/newline.trans (universal_newline_finish): new function.akr2008-09-051-2/+13
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/newline.trans: record newline types met in universalakr2008-09-041-12/+27
| | | | | | | newline decoder. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode_data.h (rb_transcoding): remove stateful field.akr2008-09-034-45/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add state field. (TRANSCODING_STATE): defined. (rb_transcoder): add fields: state_size, state_init_func, state_fini_func. change rb_transcoding* argument to void*. * transcode.c (transcode_restartable0): use TRANSCODING_STATE for first arguments of transcoder functions. (rb_transcoding_open_by_transcoder): initialize state field. (rb_transcoding_close): finalize state field. * tool/transcode-tblgen.rb: provide state size/init/fini. * enc/trans/newline.trans (universal_newline_init): defined. (fun_so_universal_newline): take void* as a state pointer. (rb_universal_newline): provide state size/init/fini. (rb_crlf_newline): ditto. (rb_cr_newline): ditto. * enc/trans/iso2022.trans (iso2022jp_init): defined. (fun_si_iso2022jp_to_eucjp): take void* as a state pointer. (fun_so_iso2022jp_to_eucjp): ditto. (fun_so_eucjp_to_iso2022jp): ditto. (iso2022jp_reset_sequence_size): ditto. (finish_eucjp_to_iso2022jp): ditto. (rb_ISO_2022_JP_to_EUC_JP): provide state size/init/fini. (rb_EUC_JP_to_ISO_2022_JP): ditto. * enc/trans/utf_16_32.trans (fun_so_from_utf_16be): take void* as a state pointer. (fun_so_to_utf_16be): ditto. (fun_so_from_utf_16le): ditto. (fun_so_to_utf_16le): ditto. (fun_so_from_utf_32be): ditto. (fun_so_to_utf_32be): ditto. (fun_so_from_utf_32le): ditto. (fun_so_to_utf_32le): ditto. (rb_from_UTF_16BE): provide state size/init/fini. (rb_to_UTF_16BE): ditto. (rb_from_UTF_16LE): ditto. (rb_to_UTF_16LE): ditto. (rb_from_UTF_32BE): ditto. (rb_to_UTF_32BE): ditto. (rb_from_UTF_32LE): ditto. (rb_to_UTF_32LE): ditto. * enc/trans/japanese.trans (fun_so_eucjp2sjis): take void* as a state pointer. (fun_so_sjis2eucjp): ditto. (rb_eucjp2sjis): provide state size/init/fini. (rb_sjis2eucjp): provide state size/init/fini. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/japanese.trans: new file.akr2008-09-031-0/+96
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/make_transdb.rb: check $(srcdir)/enc/trans beforenaruse2008-09-031-2/+3
| | | | | | | | enc/trans. * enc/trans/make_transdb.rb: keep names_t. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/make_transdb.rb: check foo.c only if foo.trans exists.akr2008-09-021-2/+15
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e