On Thu, 26 May 2005, Martin Michlmayr wrote:

* Thomas Dickey <[EMAIL PROTECTED]> [2005-05-26 18:21]:
It's compatible - but bear in mind that strings, e.g., as passed to
addstr() are interpreted based on locale.

What negative effects could that have?  Are you thinking of control
characters or anything like that?

I was thinking mainly about the places where Latin-1 and UTF-8 differ.

Having addstr behave that way wasn't what I thought of as obvious, but that's the way it's documented with X/Open, so I implemented it that way.

addnwstr() uses wide-characters, so it's unambiguous how the data are handled.

Or do you simply mean that giving an UTF-8 byte string to addstr()
is not a terribly good idea if we're not in an UTF-8 locale?  I guess

Either way: giving a string that's encoded for Latin-1 (using codes 160-255) when in UTF-8 mode would give poor results.

the proper solution would be for the Python bindings to accept Unicode
strings and then just decode them to whatever locale the user has
(replacing characters that are not available with '?' or so).

If it's a script (with embedded strings), that's probably what would be
needed.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to