Forum: Ruby-core [ruby-trunk - Bug #6995][Open] Code converter not found (UTF-8 to EUC-TW)

Posted by blueowl (blue owl) (Guest)
on 2012-09-08 18:02
(Received via mailing list)
Issue #6995 has been reported by blueowl (blue owl).

----------------------------------------
Bug #6995: Code converter not found (UTF-8 to EUC-TW)
https://bugs.ruby-lang.org/issues/6995

Author: blueowl (blue owl)
Status: Open
Priority: Normal
Assignee:
Category: M17N
Target version:
ruby -v: "ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]" and 
"ruby 2.0.0dev (2012-09-07 trunk 36920) [i686-linux]"


Hello, recently I was doing some conversion from Unicode into Chinese 
encodings, and I came across what may be a bug in Ruby. Attempting to 
transcode a traditional Chinese character from UTF-8 to EUC-TW results 
in a "code converter not found" error. This character exists in Unicode 
(U+8B6F), and if it were missing in EUC-TW, then I would expect 
"Encoding::UndefinedConversionError" rather than 
"Encoding::ConverterNotFoundError". Relevant code and Ruby versions are 
shown below for reproducing this issue.

$ ruby -v -e '"譯".encode("EUC-TW")'
ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]
/tmp/test.rb:3:in `encode': code converter not found (UTF-8 to EUC-TW) 
(Encoding::ConverterNotFoundError)
  from /tmp/test.rb:3:in `<main>'

$ ~/ruby_vm/nightly/bin/ruby -v -e '"譯".encode("EUC-TW")'
ruby 2.0.0dev (2012-09-07 trunk 36920) [i686-linux]
/tmp/test.rb:3:in `encode': code converter not found (UTF-8 to EUC-TW) 
(Encoding::ConverterNotFoundError)
  from /tmp/test.rb:3:in `<main>'
Posted by Nobuyoshi Nakada (nobu)
on 2012-09-09 03:33
(Received via mailing list)
Issue #6995 has been updated by nobu (Nobuyoshi Nakada).

Status changed from Open to Assigned
Assignee set to naruse (Yui NARUSE)
ruby -v changed from "ruby 1.9.3p0 (2011-10-30 revision 33570) 
[i686-linux]" and "ruby 2.0.0dev (2012-09-07 trunk 36920) [i686-linux]" 
to ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]" and "ruby 
2.0.0dev (2012-09-07 trunk 36920) [i686-linux]

=begin
Some transcoders are missing.

 $ ruby -e 'u = Encoding::UTF_8' -e 'puts Encoding.list.find_all{|e|e != 
u and !Encoding::Converter.search_convpath(e, u) rescue true}'
 Emacs-Mule
 EUC-TW
 IBM864
 Windows-1258
 GB1988
 macCentEuro
 macThai
 ISO-2022-JP-2
 MacJapanese
 UTF-7
=end

----------------------------------------
Bug #6995: Code converter not found (UTF-8 to EUC-TW)
https://bugs.ruby-lang.org/issues/6995#change-29219

Author: blueowl (blue owl)
Status: Assigned
Priority: Normal
Assignee: naruse (Yui NARUSE)
Category: M17N
Target version:
ruby -v: ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]" and 
"ruby 2.0.0dev (2012-09-07 trunk 36920) [i686-linux]


Hello, recently I was doing some conversion from Unicode into Chinese 
encodings, and I came across what may be a bug in Ruby. Attempting to 
transcode a traditional Chinese character from UTF-8 to EUC-TW results 
in a "code converter not found" error. This character exists in Unicode 
(U+8B6F), and if it were missing in EUC-TW, then I would expect 
"Encoding::UndefinedConversionError" rather than 
"Encoding::ConverterNotFoundError". Relevant code and Ruby versions are 
shown below for reproducing this issue.

$ ruby -v -e '"譯".encode("EUC-TW")'
ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]
/tmp/test.rb:3:in `encode': code converter not found (UTF-8 to EUC-TW) 
(Encoding::ConverterNotFoundError)
  from /tmp/test.rb:3:in `<main>'

$ ~/ruby_vm/nightly/bin/ruby -v -e '"譯".encode("EUC-TW")'
ruby 2.0.0dev (2012-09-07 trunk 36920) [i686-linux]
/tmp/test.rb:3:in `encode': code converter not found (UTF-8 to EUC-TW) 
(Encoding::ConverterNotFoundError)
  from /tmp/test.rb:3:in `<main>'
Posted by naruse (Yui NARUSE) (Guest)
on 2012-11-03 01:27
(Received via mailing list)
Issue #6995 has been updated by naruse (Yui NARUSE).

Status changed from Assigned to Feedback

We don't have UTF-8:EUC-TW converter yet.
If you want it, make a feature request ticket.

But as far as I know EUC-TW is not widely used, it is only used in 
goverment.
Instead of EUC-TW, many people use Big5.
Do you really need EUC-TW?
(for workaround you can use Iconv to convert EUC-TW in 1.9.3)
----------------------------------------
Bug #6995: Code converter not found (UTF-8 to EUC-TW)
https://bugs.ruby-lang.org/issues/6995#change-32260

Author: blueowl (blue owl)
Status: Feedback
Priority: Normal
Assignee: naruse (Yui NARUSE)
Category: M17N
Target version:
ruby -v: ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]" and 
"ruby 2.0.0dev (2012-09-07 trunk 36920) [i686-linux]


Hello, recently I was doing some conversion from Unicode into Chinese 
encodings, and I came across what may be a bug in Ruby. Attempting to 
transcode a traditional Chinese character from UTF-8 to EUC-TW results 
in a "code converter not found" error. This character exists in Unicode 
(U+8B6F), and if it were missing in EUC-TW, then I would expect 
"Encoding::UndefinedConversionError" rather than 
"Encoding::ConverterNotFoundError". Relevant code and Ruby versions are 
shown below for reproducing this issue.

$ ruby -v -e '"譯".encode("EUC-TW")'
ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]
/tmp/test.rb:3:in `encode': code converter not found (UTF-8 to EUC-TW) 
(Encoding::ConverterNotFoundError)
  from /tmp/test.rb:3:in `<main>'

$ ~/ruby_vm/nightly/bin/ruby -v -e '"譯".encode("EUC-TW")'
ruby 2.0.0dev (2012-09-07 trunk 36920) [i686-linux]
/tmp/test.rb:3:in `encode': code converter not found (UTF-8 to EUC-TW) 
(Encoding::ConverterNotFoundError)
  from /tmp/test.rb:3:in `<main>'
Posted by drbrain (Eric Hodel) (Guest)
on 2013-01-25 23:09
(Received via mailing list)
Issue #6995 has been updated by drbrain (Eric Hodel).

Status changed from Feedback to Rejected

Marking rejected due to lack of feedback from the submitter.
----------------------------------------
Bug #6995: Code converter not found (UTF-8 to EUC-TW)
https://bugs.ruby-lang.org/issues/6995#change-35660

Author: blueowl (blue owl)
Status: Rejected
Priority: Normal
Assignee: naruse (Yui NARUSE)
Category: M17N
Target version:
ruby -v: ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]" and 
"ruby 2.0.0dev (2012-09-07 trunk 36920) [i686-linux]


Hello, recently I was doing some conversion from Unicode into Chinese 
encodings, and I came across what may be a bug in Ruby. Attempting to 
transcode a traditional Chinese character from UTF-8 to EUC-TW results 
in a "code converter not found" error. This character exists in Unicode 
(U+8B6F), and if it were missing in EUC-TW, then I would expect 
"Encoding::UndefinedConversionError" rather than 
"Encoding::ConverterNotFoundError". Relevant code and Ruby versions are 
shown below for reproducing this issue.

$ ruby -v -e '"譯".encode("EUC-TW")'
ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]
/tmp/test.rb:3:in `encode': code converter not found (UTF-8 to EUC-TW) 
(Encoding::ConverterNotFoundError)
  from /tmp/test.rb:3:in `<main>'

$ ~/ruby_vm/nightly/bin/ruby -v -e '"譯".encode("EUC-TW")'
ruby 2.0.0dev (2012-09-07 trunk 36920) [i686-linux]
/tmp/test.rb:3:in `encode': code converter not found (UTF-8 to EUC-TW) 
(Encoding::ConverterNotFoundError)
  from /tmp/test.rb:3:in `<main>'
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.