diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | transcode.c | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -1,4 +1,4 @@ -Mon Jan 21 14:32:10 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> +Mon Jan 21 14:36:14 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * transcode.c (str_transcode): initialize transcoder in rb_transcoding. [ruby-dev:33234] diff --git a/transcode.c b/transcode.c index 370bd06c33..1b8e8ee9e5 100644 --- a/transcode.c +++ b/transcode.c @@ -311,14 +311,14 @@ str_transcode(int argc, VALUE *argv, VALUE *self) return -1; } - my_transcoding.transcoder = my_transcoder; - while (!final_encoding) { /* loop for multistep transcoding */ /* later, maybe use smaller intermediate strings for very long strings */ if (!(my_transcoder = transcode_dispatch(from_e, to_e))) { rb_raise(rb_eArgError, "transcoding not supported (from %s to %s)", from_e, to_e); } + my_transcoding.transcoder = my_transcoder; + if (my_transcoder->preprocessor) { fromp = sp = (unsigned char *)RSTRING_PTR(str); slen = RSTRING_LEN(str); |