* transcode.c (get_replacement_character): fix: invalid byte sequence

is always replaced "\x00?".

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2008-07-31 08:12:08 +00:00
parent 31a0672306
commit 97fdfbacec
2 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,8 @@
Thu Jul 31 17:00:10 2008 NARUSE, Yui <naruse@ruby-lang.org>
* transcode.c (get_replacement_character): fix: invalid byte sequence
is always replaced "\x00?".
Thu Jul 31 16:37:03 2008 NARUSE, Yui <naruse@ruby-lang.org>
* test/rubygems/test_gem_ext_configure_builder.rb

View File

@ -136,16 +136,16 @@ get_replacement_character(rb_encoding *enc)
if (rb_enc_asciicompat(enc)) {
return "?";
}
else if (utf16be_encoding = enc) {
else if (utf16be_encoding == enc) {
return "\x00?";
}
else if (utf16le_encoding = enc) {
else if (utf16le_encoding == enc) {
return "?\x00";
}
else if (utf32be_encoding = enc) {
else if (utf32be_encoding == enc) {
return "\x00\x00\x00?";
}
else if (utf32le_encoding = enc) {
else if (utf32le_encoding == enc) {
return "?\x00\x00\x00";
}
else {