2012/8/14 Gonzalo Odiard <gonz...@laptop.org>: >> >> 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. > > > Probably because you do not speak chinese or any other asian language.... :) > We can represent all unicode characters in utf-8 and that's one of the reasons Linux has it by default, of course the translations are encoded in utf-8 because it can represent characters from Asia, Africa, languages with derivation from Latin and non-existent languages.
Now the question is: Why should we get translations as Python type Unicode and encode them again in utf-8? We have our translations encoded in files. The activity can get the strings directly for output, but if the activity will modify or only iterate a string, it's recommended to decode the utf-8 string and work with the text in the Python type Unicode and then encode it as a utf-8 string for use it as output. What Manuel is purposing, is setup gettext appropriately for get text of type unicode with the _ function. A big part of the translated strings don't need that step of encode and decode... ~danielf _______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel