[#2121] national characters absolutely bad with cyrus sieve
Summary national characters absolutely bad with cyrus sieve
Queue Ingo
Queue Version 1.0.1
Type Bug
State Resolved
Priority 2. Medium
Owners Jan Schneider <jan (at) horde (dot) org>
Requester risko (at) risko (dot) hu
Created 06/10/2005 (1308 days ago)
Due
Updated 07/25/2005 (1263 days ago)
Assigned 07/24/2005 (1264 days ago)
Resolved 07/24/2005 (1264 days ago)
Attachments ingo.patch Download
ingo-sieve-comment-utf8.patch Download
ingo-utf8-cyrus-sieve.patch Download
Milestone
Patch No

History
07/25/2005 Jan Schneider Comment #10 Reply to this comment
Committed, thanks.

The translated comments are rather for the end users than the administrators.
07/24/2005 risko (at) risko (dot) hu Comment #9
New Attachment: ingo-sieve-comment-utf8.patch Download
Reply to this comment
Isn't that a problem, that Horde/String.php never require_once'd in
No it isn't, I know now :)

Anyway, now I read your coding_standards document (better lately, than 
never) and I found, that I should use include_once, so I fix this in 
this patch.

A bigger fix is utf8'ized comments, since it is very annoying if you 
can't pipe the generated output to a 'recode UTF-8..ISO-8859-2' as a 
system administrator because of ISO-8859-2 comments (which are invalid 
UTF-8 characters).

Anyway, I think, that it is not a good idea to have localized comments 
in a generated config file.  System administrators know english well 
enough and if someone is doing some shell magic based on english 
comments it can be a bg surprise that he has got non-english users 
with localized chinese autocommented sieve data... :)

So _() should be removed from around comment strings which will go to 
sieve scripts, I think.

Thanks,
Gergely
07/24/2005 risko (at) risko (dot) hu Comment #8 Reply to this comment
Great work! Tweaked and committed, thanks.
Isn't that a problem, that Horde/String.php never require_once'd in 
the whole file, but used String::convertChraset in 
http://cvs.horde.org/co.php/ingo/lib/Script/sieve.php?r=1.79 ??

Thanks,
Gergely

07/24/2005 Jan Schneider Comment #7
State ⇒ Resolved
Reply to this comment
Great work! Tweaked and committed, thanks.
07/24/2005 Jan Schneider State ⇒ Assigned
Assigned to Jan Schneider
 
07/23/2005 risko (at) risko (dot) hu Comment #6
New Attachment: ingo.patch Download
Reply to this comment
How's this going?
Sorry for being late.

In return, the fix is a lot more elegant now (to be precise: now it is 
correct ;) ).
And it also fixes another issue, ingo serialized accented vacation 
data wrong if database environment was iso-8859-2, while user 
environment was utf-8 (for the string length it substituted the length 
of the utf-8 string, but it wrote iso-8859-2 string as the string).   
Fortunately, the same problem did at decoding, so it only bugged the 
user if he (after saving a vacation string) changed the browser 
charset from utf-8 to iso-8859-2.

If something is not clear, ask!

Thanks for your patience,
Gergely
07/22/2005 Chuck Hagenbuch Comment #5
State ⇒ Feedback
Taken from Horde DevelopersHorde Developers
Reply to this comment
How's this going?
07/11/2005 risko (at) risko (dot) hu Comment #4 Reply to this comment
Looks like we have to fix this ourselves.
Please note, that I haven't ever received the message, which asks for 
clarifications about the patch.  I only received an email notification 
about the last comment an hour ago.

If everything goes well, I can provide a clear patch, with horde 
functions and with a configurable workaround for buggy sieve 
implementation at the weekend.  I will also try to notify the cyrus 
developers again, but my previous news article was lost by gmane...

Gergely

07/11/2005 Jan Schneider Comment #3
Assigned to Horde DevelopersHorde Developers
State ⇒ Assigned
Reply to this comment
Looks like we have to fix this ourselves.
06/13/2005 Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Please create a patch that uses Horde's conversion and encoding 
methods like MIME::encode() and String::convertCharset().
06/10/2005 risko (at) risko (dot) hu Comment #1
New Attachment: ingo-utf8-cyrus-sieve.patch Download
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ national characters absolutely bad with cyrus sieve
Queue ⇒ Ingo
Reply to this comment
1. If the browser charset is not utf-8, than characters with accents 
don't get into cyrus sieve, since the specification says, that they 
must be UTF-8 encoded in sieve scripts.
Proposal:
  - send the form with accept-charset="utf-8" (my solution do this)
OR
  - encode the returned information from NLS::getCharset() to utf-8
Affected input fields: subject, body.

2. If the header contains accents, it is not enough to encode it to 
utf-8, but we have
to mime encode it, because of buggy mail servers (like Cyrus Sieve), 
which doesn't do this themselves.
Affected input fields: subject, from. (my patch only fix the problem 
on the subject field).