Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#23 Represent language names as Unicode strings

closed-later
nobody
None
5
2004-03-27
2003-04-05
Martin v. Löwis
No

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)

Discussion

  •  
    Attachments
    • status: open --> closed-later
     
  • Logged In: YES
    user_id=100649

    Martin,

    1.3 (not released yet) will have much more unicode stuff, so
    we won't fix that for 1.2.x (1.2 can't fully handle unicode
    anyway).

    Maybe you want to have a look at the 1.3 devel version,
    maybe you can help us improving unicode support.

    http://moinmoin.wikiwikiweb.de/MoinMoinTodo_2fUnicodeSupport