Hi.
Does anyone know how to solve a problem of needlees newlines in Subject
field after converting it to utf-8 (for me it’s converted from koi8-r to
utf8)?
Before converting
After converting
?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫
?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫
Then I see that such “a little corrupted” subject after converting to
utf-8 is inserted in DB (Attachments table) and there it resides.
My configuration:
rt-3.0.11rc1 (I also tried 3.0.11, but no effect)
mysql-4.0.14
perl-5.8.2
apache-1.3.29
mod_perl-1.29
P.S. Such problem doesn’t appear when subject is very short or is typed
with ascii.
Thanks in advance.
Alex Burba, All-Russia state television and broadcasting company, NOC.
Hi.
Does anyone know how to solve a problem of needlees newlines in Subject
field after converting it to utf-8 (for me it’s converted from koi8-r to
utf8)?
Can you verify that this problem still happens with perl 5.8.3 or newer?
Jesse Vincent wrote:
Does anyone know how to solve a problem of needlees newlines in Subject
field after converting it to utf-8 (for me it’s converted from koi8-r to
utf8)?
Can you verify that this problem still happens with perl 5.8.3 or newer?
I get the same error on perl-5.8.4.
[ … cut from rt.log … ]
[Wed Jun 23 21:12:22 2004] [debug]: Converting ‘KOI8-R’ to ‘utf-8’ for
text/plain - Re: [rt.rfn.ru #362] ?О©╫ ?О©╫?О©╫?^(n)?О©╫?О©╫?О©╫ ?^(n)?О©╫
?^(n)?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫ ?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫, ?^(n)?О©╫?О©╫
?О©╫?О©╫?О©╫ ?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫ ?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫?О©╫
(/usr/local/rt3/lib/RT/I18N.pm:200)
[ … cut from rt.log … ]
And with these newlines the subject is inserted in mysql db.
What else can I try to fix it ?
Bye.
Alex S. Burba
Alex S. Burba О©╫О©╫О©╫О©╫О©╫:
Jesse Vincent wrote:
Does anyone know how to solve a problem of needlees newlines in
Subject field after converting it to utf-8 (for me it’s converted
from koi8-r to utf8)?
The problem has been solved by stripping away ‘\n’ from the subject line
after encoding it to utf-8 in I18N.pm:
sub DecodeMIMEWordsToEncoding {
[...]
# Stripping '\n' from the subject
$str =~ s/\n//g;
return ($str);
}
After testing it in depth I post the final results. Also I don’t know if
such solution is the best, maybe there are other ways to correct it.
Alex Burba, All-Russia state television and broadcasting company, NOC.