[Sugar-devel] Unicode strings in translations

S. Daniel Francis francis at sugarlabs.org
Tue Aug 14 16:27:19 EDT 2012


2012/8/14 Martin Langhoff <martin.langhoff at gmail.com>:
> Hi danielf,
Hi Martin,
><francis at sugarlabs.org> wrote:
>> I look some people is needing to know more about Unicode:
First I'll apologize because the first part of my message sounds a bit rude.

> one thing to keep in mind is that UTF-8 is one of the possible ways to
> represent Unicode data. We will, most of the time, use UTF-8 mixed up
> with straight old ASCII. Our python code files are one example.

Yes, I know UTF-8 is only one of the possible ways, but there is a
reason to use it instead of any other. Also the python code files
could be ASCII and the header line could say utf-8. The line tells
Python the charset for encode the strings.

> The BOM header didn't become popular (for good technical reasons). Is
> there a way to tell the Python interpreter that assume that our code
> (inc strings in our code) should be assumed to be unicode? If so, we
> can set that in sugar-session.

Unicode (Python Type) is for process text, but for input/output, that
text will need to be encoded as a string, and for that you will need a
code charset. Now it's the time to ask: Must we get all the translated
strings as Unicode and encode them as utf-8? I think there are too few
cases when an activity gets translated strings and needs to work
directly with unicode. Maybe I also need to get informed, this is the
good part of use a mailing list, we all know different things.

Regards.
~danielf


More information about the Sugar-devel mailing list