Bugs: Browse | Submit New | Admin

[#26498] Doesn't create a header with UTF-8 chars in 1.9

Date:
2009-07-02 22:36
Priority:
3
Submitted By:
Marvin Gülker (mguelker)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Doesn't create a header with UTF-8 chars in 1.9

Detailed description
Hi, 

I tried to create a test e-mail with tmail, but it seems that it doesn't like my name: 
------------------
#Encoding: UTF-8
require "tmail"
mail = TMail::Mail.new
mail["From"] = "Marvin Gülker <my_first.email@address>"
mail["Return-Path"] = "my_first.email@address>"
mail["To"] = "my_second.email@address"
mail["Subject"] = "Test email"
mail.body = "Some test content. "
puts mail
-------------------
I get this: 
-------------------
C:/Rubies/ruby-1.9.1-p129-i386-mingw32/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1/lib/tmail/mail.rb:524: warning: shadowing
outer local variable - f
C:/Rubies/ruby-1.9.1-p129-i386-mingw32/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1/lib/tmail/interface.rb:196: warning: mismatched
indentations at 'end' with 'def' at 190
C:/Rubies/ruby-1.9.1-p129-i386-mingw32/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1/lib/tmail/header.rb:577: warning: (...)
interpreted as grouped expression
C:/Rubies/ruby-1.9.1-p129-i386-mingw32/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1/lib/tmail/header.rb:681: warning: (...)
interpreted as grouped expression
C:/Rubies/ruby-1.9.1-p129-i386-mingw32/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1/lib/tmail/header.rb:737: warning: (...)
interpreted as grouped expression
C:/Rubies/ruby-1.9.1-p129-i386-mingw32/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1/lib/tmail/header.rb:807: warning: (...)
interpreted as grouped expression
racc/parser.rb:173: warning: shadowing outer local variable - tok
racc/parser.rb:192: warning: (...) interpreted as grouped expression
C:/Rubies/ruby-1.9.1-p129-i386-mingw32/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1/lib/tmail/port.rb:138: warning: shadowing
outer local variable - r
C:/Rubies/ruby-1.9.1-p129-i386-mingw32/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1/lib/tmail/port.rb:139: warning: shadowing
outer local variable - w
C:/Rubies/ruby-1.9.1-p129-i386-mingw32/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1/lib/tmail/net.rb:122: warning: ambiguous
first argument; put parentheses or even spaces
C:/Rubies/ruby-1.9.1-p129-i386-mingw32/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1/lib/tmail/net.rb:237: warning: ambiguous
first argument; put parentheses or even spaces
C:/Rubies/ruby-1.9.1-p129-i386-mingw32/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1/lib/tmail/net.rb:144: warning: optional
boolean argument is obsoleted
C:/Rubies/ruby-1.9.1-p129-i386-mingw32/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1/lib/tmail/net.rb:163: warning: optional
boolean argument is obsoleted
C:/Rubies/ruby-1.9.1-p129-i386-mingw32/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1/lib/tmail/scanner_r.rb:246: warning: regexp
match /.../n against to UTF-8 string
C:/Rubies/ruby-1.9.1-p129-i386-mingw32/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1/lib/tmail/scanner_r.rb:233: warning: regexp
match /.../n against to UTF-8 string
C:/Rubies/ruby-1.9.1-p129-i386-mingw32/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1/lib/tmail/scanner_r.rb:246: warning: regexp
match /.../n against to UTF-8 string
C:/Rubies/ruby-1.9.1-p129-i386-mingw32/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1/lib/tmail/scanner_r.rb:233: warning: regexp
match /.../n against to UTF-8 string
C:/Rubies/ruby-1.9.1-p129-i386-mingw32/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1/lib/tmail/scanner_r.rb:246: warning: regexp
match /.../n against to UTF-8 string
C:/Rubies/ruby-1.9.1-p129-i386-mingw32/lib/ruby/gems/1.9.1/gems/tmail-1.2.3.1/lib/tmail/scanner_r.rb:233: warning: regexp
match /.../n against to UTF-8 string
To: my_second.email@address
Subject: Test email

Some test content. 
------------------
The important part is the text after the warnings - there should be the complete email, but the "From" header
is missing. If I try that example without the umlaut ü, everything works fine and I get the header.

ruby -v: ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mingw32]
OS: Windows Vista Home Premium

Marvin

Add A Comment: Notepad

Please login


Followup

Message
Date: 2009-07-03 07:15
Sender: Marvin Gülker

Oh sorry, there was a typo in my code, line 5 has to be: 
mail["Return-Path"] =
"my_first.email@address"
And the mail I get therefore is: 
-----------------
Return-Path: <my_first.email@address>
To: my_second.email@address
Subject: Test email

Some test content. 
----------------
But the "From" header is still missing. 

Marvin

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item