[PATCH 3/3] [win32] set default locale to "English" in statistics.c

Dirk Hohndel dirk at hohndel.org
Sun Nov 6 19:44:35 PST 2011


On Sun, 6 Nov 2011 19:24:06 -0800, Linus Torvalds <torvalds at linux-foundation.org> wrote:
> On Thu, Nov 3, 2011 at 1:44 PM, Lubomir I. Ivanov <neolit123 at gmail.com> wrote:
> >
> > sets the default locale to "English" in statistics.c for win32.
> > it seems that mingw/GTK outputs xxxxxx, xxxxx characters
> > for Day, Month (%a, %b) on a non english locale Windows system
> > until 'setlocale(LC_ALL, "English")' is specified.
> 
> Quite frankly, instead of doing these odd workarounds for standard
> library routines, I'd rather just we stop using strftime entirely.
> 
> It's not a complicated routine, and we already have all the support
> for it and are already doing it by hand in other places. See
> "monthname()" and "weekday()" in main.c and how we do all this
> *without* the pain of stupid localization issues in other places.
> 
> So please just change the strftime() to a "vsnprintf()" instead, ok?
> 
> I'm also a but worried about patch 2/3, since I cannot test it.

I will test those once I'm done setting up the Mac... I currently don't
have a working cross compile setup; on my list of things to get ready
before Wednesday.

/D


More information about the subsurface mailing list