>
>
>> Here are the questions.
>>
>> 1) In livido.h we #include <wchar.c>
>
>
> You shouldnt need to include anything.
>
>
>>
>> 2) for getting the utf-8 string length in bytes, we use wcslen(). Is
>> this
>> the correct function ?
>
>
> No, regular strlen will work fine for utf-8 strings length in bytes.
>
>
>>
>>
>> 3) when a string is retrieved, we must add a utf-8 terminating NULL to
>> the
>> end. How is this done ?
>
>
> The same as you would with an ascii string- they both use a single 0
> byte as a terminating null.
>
>
>>
>>
>> 4) For testing purposes, I want to create a utf-8 string. Is there a
>> simple way to convert a char *string to utf-8 ?
>
>
> a char* string is a utf-8 string.
>
>
> Unless you plan on doing fancy things such as normalization etc, you can
> treat utf-8 strings
> like a sequence of null terminated non-null bytes.
>
>


Great !
Thanks for your quick reply :-)

Gabriel.



--
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to