Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Mar 2002 13:48:18 +0100 (CET)
From:      Tomas Pluskal <plusik@pohoda.cz>
To:        freebsd-i18n@freebsd.org, <freebsd-bugs@freebsd.org>
Subject:   multibyte(3) functions not working ?
Message-ID:  <20020308134119.J214-100000@s096-n062.tele2.cz>

next in thread | raw e-mail | index | archive | help

Hello,

I was trying to make gnumeric & gedit print Czech characters on my freebsd
system, and after few hours of investigation I found out that the problem
is probably in freebsd. Here is a simple program, that should convert
unicode character 0x161 (it's "s" with hook above) to multibyte (in this
case "singlebyte") character, but it outputs just "a". Why ?
I have tried it on a linux box also, and there it works perfectly.


------ 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;
}
-------------------------------------------

Thanks

Tomas Pluskal



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020308134119.J214-100000>