On Thursday, March 2, 2006 at 22:28:28 +0100, Hrvoje Niksic wrote:

> you can get a free compiler from here:
> http://www.borland.com/downloads/download_cbuilder.html

    Nice tip, thank you!

    Bad news: Borland 5.5.1 seems to do locales in its own way. Not at
all as I explained here, about msvcrt.dll. Seems that:

 · setlocale() returns always a composite string with newlines (as if
categories were not identical). Example setlocale(LC_ALL, ".852")

| LC_MONETARY=French_France.852
| LC_TIME=French_France.852
| LC_NUMERIC=French_France.852
| LC_COLLATE=French_France.852
| LC_CTYPE=French_France.852

 · setlocale("") does French_France.850, not following chcp.

 · It doesn't know about ".OCP" nor ".ACP", but still accepts "C",
".1252" and such.

 · Whatever setlocale charset, localeconv() only outputs CP-1252.

 · localeconv() grouping gives an Ascii string "3;0" (or "3;2;0" for
Indian). Wget of course groups by... 51 digits (Ascii code of "3").

    Seems a little bit like unusable nonsense to me. Either there is a
magic option I missed, or I'd recommend to treat Borland as C locale
(forcing coma separator and grouping by 3).

    The test code works well on MinGW. Wget itself doesn't like the
unixish ./configure and make procedure under Msys 1.0.10, but I found
the configure.bat --mingw way to use directly MinGW 3.1.0. Wget 1.10.2
so compiles, and seemingly grouping, charset, and decimal point work
well with the attached patch.

    BTW I had a problem compiling straight subversion trunk:

| F:\wget-r2129\src>mingw32-make.exe
| gcc -DWINDOWS -DHAVE_CONFIG_H -O3 -Wall -I.   -c -o cmpt.o cmpt.c
| In file included from wget.h:89,
|                  from cmpt.c:43:
| sysdep.h:199: warning: redefinition of `uint32_t'
| c:/MinGW/include/stdint.h:32: warning: `uint32_t' previously declared here
| sysdep.h:215: conflicting types for `uintptr_t'
| c:/MinGW/include/stdint.h:61: previous declaration of `uintptr_t'
| mingw32-make.exe: *** [cmpt.o] Error 1

Bye!    Alain.
How To Ask Questions The Smart Way

Attachment: wget-1.10.2.win32-setlocale.1.patch.gz
Description: application/gunzip

Reply via email to