Subject: bug#35920: strftime incorrectly assumes that nstrftime will produce UTF-8

From: Ludovic Courtès <[email-masked]>
Date: Tue, 02 Jul 2019 10:58:32 +0200

Hi,

Mark H Weaver <[email-masked]> skribis:

> John Cowan <[email-masked]> writes:
>
>> That's a mug's game: I've been there and tried it (not in Scheme). I
>> recommend writing a strftime in Scheme from scratch.  It's not that
>> hard; the most annoying thing is getting into the locale files to
>> handle the locale-sensitive directives (month name, weekday name,
>> AM/PM, and the ordering of dates).
>
> Is there a portable way to find the relevant locale files and interpret
> them, on both POSIX and Windows systems?  If so, can you point out the
> relevant documentation?

The (ice-9 i18n) module provides bindings to nl_langinfo et al.  The
actual data format is specific to the C library, so I think we cannot
portably go deeper than what (ice-9 i18n) does.

Ludo’.