Project

General

Profile

Bug #4119

about encoding convertion

Added by jason (jason joo) about 9 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
ruby -v:
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]
Backport:
[ruby-core:33580]

Description

=begin
test script:

#encoding: gbk
p "asdf".encode('utf-8')
p "的".encode('utf-8')
p " ".encode('utf-8')
p "\xa3\xa0".encode('utf-8')

output:

"asdf"
"\u7684"
"\u3000"
D:/doc/Ruby Projects/Arachno Default/test.rb:5:in encode': "\xA3\xA0" from GBK
to UTF-8 (Encoding::UndefinedConversionError)
from D:/doc/Ruby Projects/Arachno Default/test.rb:5:in
'

"\xA3\xA0" is a correct gbk encoding but it seemed invalid in utf-8 ?
=end

History

#1

Updated by naruse (Yui NARUSE) about 9 years ago

  • Status changed from Open to Rejected

=begin
It means,

  • 0xA3A0 is valid in GBK encoding scheme
  • but the code point 0xA3A0 is not assgined any characers
  • so the convert fails conversion =end

Also available in: Atom PDF