unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Christopher Lam <christopher.lck@gmail.com>
To: Mark H Weaver <mhw@netris.org>
Cc: 35920@debbugs.gnu.org
Subject: bug#35920: strftime incorrectly assumes that nstrftime will produce UTF-8
Date: Mon, 27 May 2019 10:04:39 +1000	[thread overview]
Message-ID: <CAKVAZZ+EvfAfb+A09UoLeuwpO-HaP5=2Ls=9-bfCF=_k3bT2Xg@mail.gmail.com> (raw)
In-Reply-To: <87v9xxq767.fsf_-_@netris.org>

[-- Attachment #1: Type: text/plain, Size: 1397 bytes --]

Thanks! I'm glad to know this. I have adequate fluency in guile now but
very basic C hence some bugs are very opaque to me.

On Mon., 27 May 2019, 04:43 Mark H Weaver, <mhw@netris.org> wrote:

> Hi Christopher,
>
> Christopher Lam <christopher.lck@gmail.com> writes:
>
> > Addendum - wish to confirm if guile bug (guile-2.2 on Windows):
> > - set locale to non-Anglo so that (setlocale LC_ALL) returns
> > "French_France.1252"
> > - call (strftime "%B" 4000000) - that's 4x10^6 -- this should return
> > "février 1970"
> >
> > but the following error arises:
> > Throw to key `decoding-error' with args `("scm_from_utf8_stringn" "input
> > locale conversion error" 0 #vu8(102 233 118 114 105 101 114 32 49 57 55
> > 48))'.
> >
> > Is this a bug?
>
> Yes.  Guile's 'strftime' procedure currently assumes that the underlying
> 'nstrftime' C function (from Gnulib) will produce output in UTF-8,
> although it almost certainly produces output in the locale encoding.
> Indeed, the bytevector #vu8(102 233 118 114 105 101 114 32 49 57 55 48)
> represents the characters "février 1970" in Windows-1252 encoding.
>
> I'm CC'ing this reply to <bug-guile@gnu.org>, so that a bug ticket will
> be created.  In the future, that's the preferred address for sending bug
> reports.
>
> Anyway, thanks for letting us know about this.  I'll work on it soon.
>
>       Mark
>

[-- Attachment #2: Type: text/html, Size: 2029 bytes --]

      parent reply	other threads:[~2019-05-27  0:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAKVAZZKGeVMxtMsONgmM6dVkT2UZuCmNQrXFmrDkb9_TvW_Yeg@mail.gmail.com>
     [not found] ` <877ebt7tc0.fsf@netris.org>
     [not found]   ` <CAKVAZZLTL1+AJCkQ0t8VbdS=39BxLG5=T7TD+C0_2_7-kPuY0g@mail.gmail.com>
     [not found]     ` <87tvew4efa.fsf@netris.org>
     [not found]       ` <CAKVAZZ+v9kFaAUxeJ5_opNSnmwJONT+wW14R38AHGpnwqEfuGA@mail.gmail.com>
     [not found]         ` <875zrb3ydk.fsf@netris.org>
     [not found]           ` <871s1z3tbq.fsf@netris.org>
     [not found]             ` <CAKVAZZLQ628QAfYffmOQ3Q4j9hzBck7nzh0BHSEshEU0sRQpOA@mail.gmail.com>
     [not found]               ` <CAKVAZZJP1veiMKYqpvZTZG2g6LO=_O-ovzouzEJ-T-mQUsOzYQ@mail.gmail.com>
     [not found]                 ` <CAKVAZZJ0v1-snrRQj0CAxFikKDy+Xf_FWxHXV4tVJ1mVrnY8ig@mail.gmail.com>
2019-05-26 20:41                   ` bug#35920: strftime incorrectly assumes that nstrftime will produce UTF-8 Mark H Weaver
2019-05-26 20:53                     ` Mark H Weaver
2019-05-26 21:48                       ` Mark H Weaver
2019-06-30 19:51                         ` Ludovic Courtès
2019-06-30 21:12                           ` Mark H Weaver
2019-06-30 22:37                             ` John Cowan
2019-06-30 23:06                               ` Mark H Weaver
2019-07-01  1:28                                 ` John Cowan
2019-07-02  8:58                                 ` Ludovic Courtès
2019-07-02  9:07                             ` Ludovic Courtès
2019-07-02 16:51                               ` John Cowan
2019-05-27  0:04                     ` Christopher Lam [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKVAZZ+EvfAfb+A09UoLeuwpO-HaP5=2Ls=9-bfCF=_k3bT2Xg@mail.gmail.com' \
    --to=christopher.lck@gmail.com \
    --cc=35920@debbugs.gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).