1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

19 commits

Author SHA1 Message Date
naruse
dec6ba8a22 * ext/nkf/nkf-utf8/nkf.c: Updated.
* ext/nkf/nkf.c (rb_nkf_enc_get): added.
  (find encoding or replicate default encoding)

* ext/nkf/nkf.c (NKF::<ENCODING>): redefine encoding constant.

* ext/nkf/lib/kconv.rb (Kconv::<ENCODING>): redefined as Encoding.

* ext/nkf/lib/kconv.rb: refactoring.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-19 10:19:38 +00:00
naruse
01b097e475 * ext/nkf/lib/kconv.rb (tojis, tosjis, toeuc, toutf8):
set encoding. [ruby-dev:32447]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-04 09:06:41 +00:00
naruse
5300eecfb3 * ext/nkf/nkf-8/nkf.c: imported nkf 2.0.8 rev.110.
* Fix: check_bom cuts \xfe\xff\xXX\xXX of UTF-32.
  * Add support --ic=UTF-32.
  * Fix: can't guess UTF-16 and UTF-32.
  * Fix: can't decode beyond BMP of UTF-16LE.

* ext/nkf/nkf.c (guess): Support UTF-32.

* ext/nkf/lib/kconv.rb (kconv): Support UTF-32.

* ext/nkf/lib/kconv.rb (to_utf32): new method.

* ext/nkf/lib/kconv.rb (to_utf32): new method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-15 11:26:07 +00:00
naruse
103f6728df * ext/nkf/lib/kconv.rb (Kconv::toeuc): remove -m0 [ruby-dev:29505]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-06 03:20:10 +00:00
naruse
2d99616ec8 * ext/nkf/lib/kconv.rb (Kconv::RegexpEucjp): fix regexp for euc-jp [ruby-dev:29344]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-22 03:41:46 +00:00
naruse
a59c6fe7c9 * kconv.rb: remove default -m0 and fix document.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-19 14:40:23 +00:00
naruse
e49d874542 * ext/nkf/nkf-utf8/{nkf.c, utf8tbl.c}: imported nkf 2.0.6.
* Add --ic / --oc option and mapping tables.
  * Add fallback option.
  * Add --no-best-fit-chars option.
  * Fix some bugs.

* ext/nkf/nkf.c (nkf_split_options): added for parse option string.

* ext/nkf/lib/kconv.rb (Kconv.to*): add -m0.
  Note that Kconv.to* still imply -X.

* ext/nkf/test.rb: Removed.  Obsolete by test/nkf.

* ext/.document: enabled documents in nkf and kconv

* ext/nkf/nkf.c, ext/nkf/lib/kconv.rb: Add rdoc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-03-27 13:48:21 +00:00
nobu
ec12edb11c * lib/scanf.rb (Scanf::FormatSpecifier#letter, #width): use matched
substring directly.

* ext/nkf/lib/kconv.rb (Kconv.conv): get rid of nil.to_a.

* test/ruby/test_assignment.rb, test/ruby/test_iterator.rb: followed
  change of sample/test.rb.

* test/net/http/test_http.rb: removed superfluous splatting stars.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-08 10:45:52 +00:00
naruse
311d02a322 * ext/nkf/lib/kconv.rb: ensure that symbol_to_option is private_class_method
and all other methods are module_function
  fixed: [ruby-dev:26808]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-17 12:59:57 +00:00
naruse
2bf3c6b631 * ext/nkf/lib/kconv.rb: Kconv.kconv is now alias of Kconv.conv
* ext/nkf/lib/kconv.rb: remove nkf dependend symbols fomr SYMBOL_TO_OPTION


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-12 23:19:58 +00:00
naruse
04826ff77b * ext/nkf/lib/kconv.rb: fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-05 15:25:36 +00:00
naruse
26f0a39bb3 * ext/nkf/nkf-utf8/{nkf.c,utf8tbl.c,config.h}:
imported nkf.c 1.70 (support UTF-8-MAC)

* ext/nkf/lib/kconv.rb: add :utf8mac and :internalunicode


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-05 15:19:36 +00:00
naruse
8e70a60da0 * ext/nkf/lib/kconv.rb: add Kconv::VERSION
* ext/nkf/lib/kconv.rb (conv): can process arrayed options
* ext/nkf/nkf-utf8/nkf.c: imported Revision 1.69
* ext/nkf/nkf-utf8/utf8tbl.c: imported Revision 1.9


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-27 16:53:48 +00:00
naruse
73812eca67 * ext/nkf/lib/kconv.rb: remove constants
Iconv_Shift_JIS, Uconv_EUC_JP, Iconv_UTF8
* ext/nkf/lib/kconv.rb: add module functions to Kconv
  conv, {eucjp, shiftjis, utf8}?, guess_as_symbol
* ext/nkf/lib/kconv.rb: add instance methods to String
  conv, {eucjp, shiftjis, utf8}?
* ext/nkf/lib/kconv.rb: add aliases Kconv.to_* and String#to_*


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-25 02:50:50 +00:00
naruse
3eac379906 * ext/nkf/lib/kconv.rb (guess_old): not use NKF.guess_old
but NKF.guess1. fixed: [ruby-dev:25491]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-24 07:10:44 +00:00
nobu
1b9d66dfeb * ext/nkf/lib/kconv.rb (Kconv::RegexpEucjp): second byte is up to
0xfe.

* ext/nkf/lib/kconv.rb (Kconv#kconv): should handle UTF8 and UTF16
  properly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-28 06:26:34 +00:00
naruse
35b917f3ee follow to nkf 2.0.4
:new constants
  NKF::VERSION
  NKF::ASCII
  NKF::UTF8
  NKF::UTF16
  NKF::UTF32
:new methods
  NFK.guess1 (guess)
  NKF.guess2 (from nkf2)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-29 06:51:33 +00:00
matz
0d684beafb 19991029
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-10-29 09:25:48 +00:00
matz
0a64817fb8 remove marshal/gtk/kconv
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-08-13 05:37:52 +00:00