[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] Evas Utf-8 patch



On Tue, 31 Oct 2006 23:21:46 +0100 Simon TRENY <simon.treny@free.fr> babbled:

> Hi,
> 
> Here is a patch that changes the behaviour of
> evas_common_font_utf8_get_next() and evas_common_font_utf8_get_pref():
> for now, these functions return 0 at the first invalid UTF-8 char met,
> and do not continue further. With this patch, the functions will try to
> return a char code even if the char is invalid and they will only
> return 0 at the end (or at the start for get_prev()) of the string.
> 
> The returned code will probably be incorrect, but at least, when Evas
> will render the string, the text won't be cut at the first invalid
> char position. It happens quite often when we use E17 in an accented
> language: the accented title of the windows are often incomplete
> because the title is often encoded in ascii 8-bit (at least for apps in
> French). It also helps when you have to render text and you don't know
> the encoding (Metadata, subtitles, ...).
> 
> Note that with this patch, evas_common_font_utf8_get_next() will return
> valid char code if the string is encoded in ascii 8-bit.

i think this is more a matter that with e we need to convert whatever local
encoding for icccm props (if the app isnt using utf8 for its string encodings
of properites like titme) and convert to utf8. ecore_x SHOULD be doing that, so
it ALWAYS presents utf8 text, but does not.


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster@rasterman.com
裸好多
Tokyo, Japan (東京 日本)