diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-31 10:59:39 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-31 10:59:39 +0000 |
commit | 931ba3f3b7cc4bff8a8bcc11c82c581472f17a55 (patch) | |
tree | e48dbaa6abbe12987f4a8a8fb50a63482fafd548 /transcode.c | |
parent | 97fdfbacec882b9b90eda89a2aeded0faedc3ef8 (diff) | |
download | ruby-931ba3f3b7cc4bff8a8bcc11c82c581472f17a55.tar.gz |
* transcode.c (get_replacement_character): use U+FFFD as replacement
character when convert to Unicode.
* test/ruby/test_transcode.rb (test_unicode_public_review_issue_121):
rename from test_public_review_issue_121.
* test/ruby/test_transcode.rb (test_unicode_public_review_issue_121):
enable option2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode.c')
-rw-r--r-- | transcode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/transcode.c b/transcode.c index 4d9f00f8c2..55f4b2faf3 100644 --- a/transcode.c +++ b/transcode.c @@ -137,16 +137,16 @@ get_replacement_character(rb_encoding *enc) return "?"; } else if (utf16be_encoding == enc) { - return "\x00?"; + return "\xFF\xFD"; } else if (utf16le_encoding == enc) { - return "?\x00"; + return "\xFD\xFF"; } else if (utf32be_encoding == enc) { - return "\x00\x00\x00?"; + return "\x00\x00\xFF\xFD"; } else if (utf32le_encoding == enc) { - return "?\x00\x00\x00"; + return "\xFD\xFF\x00\x00"; } else { return "?"; |