summaryrefslogtreecommitdiff
path: root/ext/nkf
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-24 19:14:47 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-24 19:14:47 +0000
commitb7464f8513d5a2160cfe98951fe8187c275fc71b (patch)
tree895d8397ed595de66912ed7f3382494a14a0b530 /ext/nkf
parent59f23bd421656f8d754e43be6a62824d0b9824ac (diff)
* ext/nkf/nkf.c (rb_nkf_convert): output of mime encode is US-ASCII.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/nkf')
-rw-r--r--ext/nkf/nkf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/nkf/nkf.c b/ext/nkf/nkf.c
index c64605b..2476144 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;
}