* transcode.c (rb_econv_substr_append): associate dst with destination
encoding when dst is created. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c6d291b003
commit
b47c46106a
@ -1,3 +1,8 @@
|
|||||||
|
Sun Aug 24 15:43:41 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* transcode.c (rb_econv_substr_append): associate dst with destination
|
||||||
|
encoding when dst is created.
|
||||||
|
|
||||||
Sun Aug 24 15:21:28 2008 Tanaka Akira <akr@fsij.org>
|
Sun Aug 24 15:21:28 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* include/ruby/encoding.h (rb_str_transcode): add ecflags argument.
|
* include/ruby/encoding.h (rb_str_transcode): add ecflags argument.
|
||||||
|
@ -1334,8 +1334,11 @@ rb_econv_substr_append(rb_econv_t *ec, VALUE src, long off, long len, VALUE dst,
|
|||||||
rb_econv_result_t res;
|
rb_econv_result_t res;
|
||||||
int max_output;
|
int max_output;
|
||||||
|
|
||||||
if (NIL_P(dst))
|
if (NIL_P(dst)) {
|
||||||
dst = rb_str_buf_new(len);
|
dst = rb_str_buf_new(len);
|
||||||
|
if (ec->destination_encoding)
|
||||||
|
rb_enc_associate(dst, ec->destination_encoding);
|
||||||
|
}
|
||||||
|
|
||||||
if (ec->last_tc)
|
if (ec->last_tc)
|
||||||
max_output = ec->last_tc->transcoder->max_output;
|
max_output = ec->last_tc->transcoder->max_output;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user