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

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.web.wiki.moin.devel
Message-ID <[email protected]>
Patches item #715905, was opened at 2003-04-05 19:12
Message generated for change (Comment added) made by thomaswaldmann
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=308482&aid=715905&group_id=8482

Category: None
Group: None
>Status: Closed
>Resolution: Later
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)





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

>Comment By: Thomas Waldmann (thomaswaldmann)
Date: 2004-03-27 16:01

Message:
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


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

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


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.