[Moin-devel] [ moin-Patches-715905 ] Represent language names as Unicode strings

SourceForge.net noreply at sourceforge.net
Sat Apr 5 08:57:02 EST 2003


Patches item #715905, was opened at 2003-04-05 19:12
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=308482&aid=715905&group_id=8482

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Martin v. Löwis (loewis)
Assigned to: Nobody/Anonymous (nobody)
Summary: Represent language names as Unicode strings

Initial Comment:
Currently, if the charset is not Latin-1, the language
names Français and Português come out incorrectly.

This patch fixes this, by:

1. Representing the language names as Unicode strings
in source code.

2. Converting them to the target character set when
creating the userform

3. Adding a new function i18n.htmlQuote, which works
like cgi.escape, but also encodes Unicode strings. If
the Unicode string cannot be encoded in config.charset,
it uses HTML character references.

None of the currenlty-English language names (Hebrew,
Japanese, etc.) have been converted; if this is done,
the encoding of the file needs to change from Latin-1
to UTF-8. Since Python 2.x for x<3 only supports
Latin-1 in Unicode literals, the native-language names
of the language need to be changed like so: Replace

  u"Hebrew"

with

  unicode("<Hebrew name of Hebrew>", "utf-8")

(A local function u() might come handy for that)





----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=308482&aid=715905&group_id=8482




More information about the Moin-devel mailing list