Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #7389

Re: Encoding Convertor failed for utf-7 to utf-8

From Robert Klemme <shortcutter@googlemail.com>
Newsgroups comp.lang.ruby
Subject Re: Encoding Convertor failed for utf-7 to utf-8
Date 2018-05-10 13:06 +0200
Message-ID <flindtFgq1jU1@mid.individual.net> (permalink)
References <3fef5789-43e4-48a6-9481-3f1dee611883@googlegroups.com>

Show all headers | View raw


Oh, finally a real Ruby question here in Usenet! :-)

On 09.05.2018 16:52, Suresh G wrote:

> I am getting Encoding::ConverterNotFoundError, when try to convert utf-7 string to utf-8.
> 
> I have a requirements of parsing the email and display the the email in rails app. I am using the gem https://github.com/mikel/mail for parsing the email. This is looking like core ruby issue, I thought to discuss understand here.
> 
> Can somebody explain why there is no default converter for utf-7 to utf-8?. As utf-7 is mostly used in Emails, this should be there by default. If there is option to write custom Encoding::Converter, what is the procedure for it, I couldn't get something in docs.

I cannot remember having seen an UTF-7 email.  In my neck of the woods 
it is usually either ASCII or some ISO-8859-1 variant.

"UTF-7, a 7-bit encoding sometimes used in e-mail, often considered 
obsolete (not part of The Unicode Standard, but only documented as an 
informational RFC, i.e., not on the Internet Standards Track either);"

https://en.wikipedia.org/wiki/Unicode#Unicode_Transformation_Format_and_Universal_Coded_Character_Set

I would say, either you are dealing with an obscure source of emails or 
you mistook another format for UTF-7.

Cheers

	robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

Back to comp.lang.ruby | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Encoding Convertor failed for utf-7 to utf-8 Suresh G <sureshggg@gmail.com> - 2018-05-09 07:52 -0700
  Re: Encoding Convertor failed for utf-7 to utf-8 Robert Klemme <shortcutter@googlemail.com> - 2018-05-10 13:06 +0200
    Re: Encoding Convertor failed for utf-7 to utf-8 Suresh G <sureshggg@gmail.com> - 2018-05-10 23:41 -0700

csiph-web