diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-24 19:14:47 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-24 19:14:47 +0000 |
commit | 392d9eca822341c59864a4475f9bb785aed80ce4 (patch) | |
tree | 895d8397ed595de66912ed7f3382494a14a0b530 /ext/nkf | |
parent | 8355df5d968862ba992fef1454cc178f160fa3ab (diff) | |
download | ruby-392d9eca822341c59864a4475f9bb785aed80ce4.tar.gz ruby-392d9eca822341c59864a4475f9bb785aed80ce4.tar.xz ruby-392d9eca822341c59864a4475f9bb785aed80ce4.zip |
* ext/nkf/nkf.c (rb_nkf_convert): output of mime encode is US-ASCII.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/nkf')
-rw-r--r-- | ext/nkf/nkf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/nkf/nkf.c b/ext/nkf/nkf.c index c64605b38..24761449d 100644 --- a/ext/nkf/nkf.c +++ b/ext/nkf/nkf.c @@ -169,7 +169,10 @@ rb_nkf_convert(VALUE obj, VALUE opt, VALUE src) rb_str_set_len(result, output_ctr); OBJ_INFECT(result, src); - rb_enc_associate(result, rb_nkf_enc_get(nkf_enc_name(output_encoding))); + if (mimeout_f) + rb_enc_associate(result, rb_usascii_encoding()); + else + rb_enc_associate(result, rb_nkf_enc_get(nkf_enc_name(output_encoding))); return result; } |