aboutsummaryrefslogtreecommitdiffstats
path: root/ext/nkf
Commit message (Collapse)AuthorAgeFilesLines
* * nkf.c: update to r1.188. fixes for 16bit environment.naruse2008-11-073-25/+71
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/nkf.c (kanji_convert): output unicode chars.naruse2008-10-281-3/+20
| | | | | | | | | [ruby-dev:36957] * ext/nkf/nkf-utf8/nkf.c (numchar_getc): increase buffer size. reported and patched at [ruby-dev:36957] by mame. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf.c (rb_nkf_convert): should specify type of variable.kazu2008-10-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf.c (rb_nkf_convert): avoid GC.naruse2008-10-261-1/+2
| | | | | | reported in [ruby-dev:36909] and patched [ruby-dev:36941] by mame. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/utf8tbl.c: update table.naruse2008-10-051-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf.c (rb_nkf_enc_get): don't replicate encoding.naruse2008-10-041-3/+0
| | | | | | [ruby-dev:36575] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/nkf.c: commit miss.nobu2008-09-291-8/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/nkf.c: constified.nobu2008-09-291-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/nkf.c: fix memory violation. mentioned by mame ↵naruse2008-09-181-15/+17
| | | | | | [ruby-dev:36373] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf.c (rb_nkf_convert): output of mime encode is US-ASCII.naruse2008-07-241-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/nkf.c (struct input_code.name, input_codename):nobu2008-07-221-6/+6
| | | | | | | constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/nkf.c (options): use input_endian.naruse2008-07-091-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/nkf.c (nkf_str_caseeql): added.naruse2008-05-211-17/+15
| | | | | | * ext/nkf/nkf-utf8/nkf.c (nkf_enc_find_index): use nkf_str_caseeql. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/nkf.c (nkf_enc_find_index):naruse2008-05-211-1/+1
| | | | | | use strcasecmp. [ruby-dev:34787] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/nkf.c (rb_nkf_convert) (nkf_enc_without_bom):naruse2008-05-202-2371/+2516
| | | | | | | | | | reverted. nkf-utf8/nkf.c should be independent of ruby. * ext/nkf/nkf.c (options): moved from nkf-utf8/nkf.c. override nkf's original settings for Unicode BOM. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf.c (rb_nkf_convert), ext/nkf/nkf-utf8/nkf.cnobu2008-05-202-5/+19
| | | | | | | | | | (nkf_enc_without_bom): BOM is not a part of encodings. * ext/nkf/nkf.c (Init_nkf), ext/nkf/nkf-utf8/nkf.c (options): UTF-{16,32} without endian have no sense. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/nkf.c (score_table_A0, score_table_F0):naruse2008-04-222-5/+5
| | | | | | | | | | | | type of content is unsigned char. * ext/nkf/nkf-utf8/nkf.c (push_broken_buf): 'c' is nkf_char. * ext/nkf/nkf-utf8/nkf.c (push_broken_buf): enc is 0 or pointer. * ext/nkf//nkf.c (options): type of option is unsigned char. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/nkf.c (z_conv): characters must be nkf_char.naruse2008-04-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/utf_16_32.c (fun_so_to_utf_16be, fun_so_to_utf_16le): addmame2008-04-171-4/+0
| | | | | | | | | | | | | | | | | parentheses to remove warnings of gcc. * io.c (rb_io_getc): remove unused variables. * compile.c (NODE_NEXT, NODE_REDO): remove unused labels. * ext/nkf/nkf.c (rb_nkf_convert): remove unused variables. * ext/syck/rubyext.c (syck_resolver_initialize, syck_resolver_detect_implicit, syck_emitter_emit): remove unused variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/nkf.c (nkf_enc_from_index): BINARY does notmatz2008-02-071-0/+2
| | | | | | have in-bound encoding index. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/nkf.h: set properties.nobu2008-01-271-174/+174
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf.c: raise error when no output encoding is given.naruse2008-01-273-14/+27
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby-trunk.naruse2008-01-271-0/+1
| | | | | | | * lib/irb/ruby-lex.rb (RubyLex#buf_input): use chars.to_a. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkt-utf8: update nkf.naruse2008-01-275-3399/+3494
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/lib/kconv.rb (Kconv.tolocale): argument is str.naruse2008-01-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf.c: rdoc update.naruse2008-01-121-6/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/nkf.c: fix bug: -m was -m0.naruse2008-01-111-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/nkf.c: update to r1.163.naruse2008-01-113-20/+13
| | | | | | | | | * ext/nkf/nkf.c: ASCII's canonical name is US-ASCII. * ext/nkf/lib/kconv.rb (Kconv.isjis): force_encoding('BINARY'). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/{nkf.c, utf8tbl.c}: Update nkf.naruse2008-01-014-864/+788
| | | | | | | | | | | * ext/nkf/nkf.c: fix documents. * ext/nkf/lib/kconv.rb: fix documents. (Kconv.is*): use valid_encoding?. (Kconv.isjis): defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf.c (rb_nkf_enc_get): use rb_define_dummy_encoding.naruse2007-12-234-85/+94
| | | | | | | | | | | | | | * ext/nkf/nkf.c (Init_nkf): use rb_nkf_enc_get("ASCII"). * ext/nkf/nkf-utf8/nkf.c: Update 1.161. * ext/nkf/nkf-utf9/config.h: default output encoding is now UTF-8. * ext/nkf/lib/kconv.rb (Kconv.kconv): replace Encoding#name by Encoding#to_s. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/nkf/nkf.c follow previous rb_ascii_encoding renaming. akr2007-12-231-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf.c (Init_nkf): use rb_ascii_encoding() fornaruse2007-12-221-1/+1
| | | | | | | | rb_nkf_enc_get("US-ASCII"). * if use rb_nkf_enc_get("US-ASCII"), ruby will crash - this is bug? git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8.c: Update nkf.c rev:1.157.naruse2007-12-223-165/+140
| | | | | | | | | | * ext/nkf/nkf.c (rb_nkf_enc_get): replicate proper based encoding. * ext/nkf/kconv.c (Kconv#kconv, to*): use self.encoding as from_enc when from_enc isn't given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_str_new, rb_intern3): rb_default_encoding() renamed.usa2007-12-211-1/+1
| | | | | | | | * ext/nkf/nkf.c (rb_nkf_putchar): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/config.h (MIME_DECODE_DEFAULT, X0201_DEFAULT):naruse2007-12-211-0/+3
| | | | | | | | | | defined as FALSE. nkf and kconv don't decode MIME encoded string and don't convert JIS X 0201 Katakana. * test/nkf/test_kconv.rb: fix tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/nkf.c: Updated.naruse2007-12-193-85/+44
| | | | | | | | | | | | | | * 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
* * ext/nkf/nkf.c (NKF::_ENCODING): removed.naruse2007-12-192-1040/+1226
| | | | | | | | | | | | | | | | | | * ext/nkf/nkf.c (rb_nkf_kconv): renamed to rb_nkf_convert. * ext/nkf/nkf.c (rb_nkf_convert): set encoding. * ext/nkf/nkf.c (rb_nkf_guess1): removed. * ext/nkf/nkf.c (rb_nkf_guess2): renamed to rb_nkf_guess. * ext/nkf/nkf.c (rb_nkf_guess): guess method now returns encoding object. * ext/nkf/nkf-utf8/nkf.c: Update to nkf 2.0.8 2007-12-19. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/lib/kconv.rb (tojis, tosjis, toeuc, toutf8):naruse2007-12-041-4/+4
| | | | | | | set encoding. [ruby-dev:32447] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf.c, bin/ri, bin/irb: fixed typos in doc and comments.matz2007-10-031-2/+2
| | | | | | a patch from Eugene Ossintsev <eugoss AT gmail.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/nkf.c (kanji_convert): Fix guess fallback.naruse2007-06-051-4/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/json.rb, lib/json, ext/json, test/json:naruse2007-06-043-70/+378
| | | | | | | import JSON library. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf.c (rb_str_resize, rb_nkf_kconv, rb_nkf_guess1,knu2007-02-271-5/+5
| | | | | | | | | rb_nkf_guess2): Silence warnings regarding char * vs. unsigned char * mismatch; submitted by Lyle Johnson <lyle.johnson@gmail.com> in [ruby-core:10416]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-utf8/{nkf.c,utf8tbl.c}:naruse2007-02-062-91/+224
| | | | | | | | | | | | | | imported nkf 2007-01-28. * Fixed: can't decode MIME encode JIS string. * Fixed: Fullwitdh-halfwidth conversion. * Support DoCoMo's and Softbank's EMOJI * Support CP932, CP5022x, eucJP-ms UDC * Support UTF-32 encoding * Support beyond BMP [ruby-dev:29700] [ruby-dev:29922] [ruby-dev:30144] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/nkf-8/nkf.c: imported nkf 2.0.8 rev.110.naruse2006-09-153-31/+117
| | | | | | | | | | | | | | | | | | * 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
* * ext/nkf/nkf-8/nkf.c: imported nkf 2.0.8 2006-09-15.naruse2006-09-141-254/+495
| | | | | | | | Add support for U+10000 - U+10FFFF Add support UTF-32 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/lib/kconv.rb (Kconv::toeuc): remove -m0 [ruby-dev:29505]naruse2006-09-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.h (struct RString): embed small strings.matz2006-08-311-13/+12
| | | | | | | | | | (RSTRING_LEN): defined for accessing string members. (RSTRING_PTR): ditto. * string.c: use RSTRING_LEN and RSTRING_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/nkf/lib/kconv.rb (Kconv::RegexpEucjp): fix regexp for euc-jp ↵naruse2006-08-221-2/+2
| | | | | | [ruby-dev:29344] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add extconf.h to .cvsignore.akr2006-06-241-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * kconv.rb: remove default -m0 and fix document.naruse2006-06-191-16/+35
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e