[GNC-dev] Static locale commit unfortunately buggy

John Ralls jralls at ceridwen.us
Sat Jan 19 17:21:58 EST 2019



> On Jan 12, 2019, at 3:31 AM, Christian Stimming <christian at cstimming.de> wrote:
> 
> Dear John,
> 
> unfortunately your commit b4fedff9 of last weekend breaks the correct locale 
> treatment. I didn't investigate this in detail, but the date status bar 
> message changed to english with this commit instead of sticking to my local 
> language. This is with LANG=de_DE.UTF-8 
> Could you have a look into this? Thanks a lot!

Christian,

Thanks for noticing. It seems that the std::locale objects created by boost::locale aren't quite compatible. I've resolved the problem, at least for maint, by using boost::locale to format date-times instead of boost::date_time.

For the future we can consider another reimplementation of GncDateTime. boost::date_time is an oldish library and hasn't been improved much since it was accepted into boost. It's a bit quirky and doesn't perform very well. std::chrono in C++20 has calendar and timezone functions, so that's one possible replacement, though not until at least llvm and gcc implement the expanded std::chrono and those implementations are widely available. There's also ICU as wrapped by boost::locale. I demurred from that when I picked boost::date_time because it's huge, but if we're pulling it in anyway it's worth reconsidering.

Regards,
John Ralls



More information about the gnucash-devel mailing list