summaryrefslogtreecommitdiff
path: root/transcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'transcode.c')
-rw-r--r--transcode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/transcode.c b/transcode.c
index 0514adaf7e..8aa9cf3352 100644
--- a/transcode.c
+++ b/transcode.c
@@ -2700,7 +2700,7 @@ str_transcode0(int argc, VALUE *argv, VALUE *self, int ecflags, VALUE ecopts)
if (!NIL_P(ecopts)) {
rep = rb_hash_aref(ecopts, sym_replace);
}
- dest = rb_str_scrub(str, rep);
+ dest = rb_enc_str_scrub(senc, str, rep);
if (NIL_P(dest)) dest = str;
*self = dest;
return dencidx;