Project

General

Profile

Actions

Bug #4119

closed

about encoding convertion

Added by jason (jason joo) about 14 years ago. Updated over 13 years ago.

Status:
Rejected
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

Actions

Also available in: Atom PDF

Like0
Like0