HyperArch.py multibyte charset

Bug #558005 reported by tkikuchi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
Undecided
Unassigned

Bug Description

HyperArch.py in 2.1b5 use Utils.uquote() for
CGIescape() and html_quote() but it does not take
language argument. This is no good for multilbyte
charset because characters are escaped in separate 8bit
bytes which results in mojibake.
We should rather use Utils.uncanonstr() to honor the
legal characters within the multibyte charset.
This patch fixes other minor bugs in the current code.

Revision history for this message
tkikuchi (tkikuchi-users) wrote :

The file hyperarc.py.diff was added: HyperArch.py.diff

Revision history for this message
bwarsaw (bwarsaw) wrote :

Logged In: YES
user_id=12800

Here's a new version of the patch that applies cleanly to
current cvs. I'm not sure I'm testing it well enough, so
could you take a look?

Revision history for this message
bwarsaw (bwarsaw) wrote :

The file 646884.txt was added: None

Revision history for this message
loewis (loewis-users) wrote :

Logged In: YES
user_id=21627

Tokio, can you please explain the problem in more detail?
Utils.uquote will always return 7bit strings only,
potentially with nested HTML character references. Why could
this cause a problem in a multi-byte encoding? Can you refer
to a page that looks incorrectly because of that?

Revision history for this message
tkikuchi (tkikuchi-users) wrote :

Logged In: YES
user_id=67709

Thanks Barry. The patch was successfully applied and things
are worklng better. (a new i18n problem in date format, though)

Revision history for this message
tkikuchi (tkikuchi-users) wrote :

Logged In: YES
user_id=67709

I think I have to generate new translation regarding the
date format problem. Sorry.

Revision history for this message
bwarsaw (bwarsaw) wrote :

Logged In: YES
user_id=12800

Tokio, do you have an answer for Martin's question? If this
solves a real problem w/ Japanese, I'm happy to apply it,
but it would be good to have a sample or test case that
fails without it.

Revision history for this message
bwarsaw (bwarsaw) wrote :

Logged In: YES
user_id=12800

Never mind, I saw your follow up in mailman-i18n. That's
good enough for me, so I'll apply the patch.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.