Jonas Maebe wrote 7 lines
On 19 Mar 2008, at 11:20, wrote:
>Linux i386 system, fpc from svn rev 10506.
Did this work before? If so, between which and which revision did it
stop working?
No, it was first experiment.
Show quoted text 14 lines
>Simple program for retrive system charset:
>
>program b;
>uses
> Libc;
>begin
> writeln(nl_langinfo(CODESET));
>end.
>
>Prints: ANSI_X3.4-1968
You are normally required to initialise the locale yourself before
calling nl_langinfo(CODESET), by calling setlocal(LC_ALL,'') (at least
on non-Linux this is always needed).
I'am very sorry, I do not know about initializing (setlocale(LC_ALL,'')). With this it works ok.
Thanks.
With kylix compiler it works without initializing, now I found why. In sysutils initialization they call setlocale. It confused me.
But missing __libc_start_main do not mind? I think that it initializes malloc and threads.
Petr
Ing. Petr Kristan
.
EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice
tel: +420 466335223 Czech Republic (Eastern Europe)
fax: +420 466510709