Re: [gnome-print] latin2 (i18n?) problems
- From: Owen Taylor <otaylor redhat com>
- To: Tomas Pluskal <plusik pohoda cz>
- Cc: Lauris Kaplinski <lauris ximian com>, gnome-print ximian com
- Subject: Re: [gnome-print] latin2 (i18n?) problems
- Date: Sun, 10 Mar 2002 19:28:03 -0500 (EST)
Tomas Pluskal <plusik@pohoda.cz> writes:
> Thanks for advice, the testprint worked ok, so I started investigation in
> gedit & gnumeric sources, and I found out that the problem is probably in
> FreeBSD implementation of multibyte(3) functions. I have written a sample
> program:
> ------ test.c -----------------------------
> #include <stdlib.h>
> #include <locale.h>
>
> int main(int argc, char *argv[])
> {
> char s[1024];
> int x;
>
> setlocale(LC_ALL, "cs_CZ.ISO8859-2");
> x=wctomb(s, 0x0161);
>
> printf("char count: %d\nchar: %c\n",x,s[0]);
>
> return 0;
> }
> -------------------------------------------
> It should output a "s" with hook (unicode 0x161) character, but it outputs
> just "a". In linux it outputs hooked s correctly!
There is no requirement that wide characters are the same as unicode...
though a lot of the GNOME-1.2 code around has the assumption that is
the case.
(If __STDC_ISO_10646__ is defined, it's a valid assumption.)
This sort of code can be ditched with GNOME-2.0 where GLib-2.0 has
nice and portable encoding conversion functions.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]