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 | 9a67b8528097ca42bcbb82b8e267019a6871d565 (patch) | |
| tree | e48dbaa6abbe12987f4a8a8fb50a63482fafd548 /transcode.c | |
| parent | a46a71fabdc4314adb62566219ea396c08bffc59 (diff) | |
| download | ruby-9a67b8528097ca42bcbb82b8e267019a6871d565.tar.gz ruby-9a67b8528097ca42bcbb82b8e267019a6871d565.tar.xz ruby-9a67b8528097ca42bcbb82b8e267019a6871d565.zip | |
* 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: http://svn.ruby-lang.org/repos/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 4d9f00f8c..55f4b2faf 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 "?"; |
