This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix strptime era handling, add more era tests [BZ #24394]


28.03.2019 17:38 Carlos O'Donell <codonell@redhat.com> wrote:
> On 3/28/19 12:23 AM, DJ Delorie wrote:
> [...]
> > +
> > +  { "Japanese era change, 1926, before first transition's year",
> > +    1925, Dec,  31, Thu, 12, 00, 00, "ja_JP.UTF-8", "%EY",
> > +    "\345\244\247\346\255\24314\345\271\264", 1 },
> 
> I'm not happy to see explicitly written out binary mbcs data here.

I think we have already written UTF-8 codes explicitly in some other
tests so I think it would be OK here as well.  However, I'd like to
see the actual glyphs written in the comment to explain what these
binary codes should mean.  I think it is nice for a potential reviewer
who is able to read this particular script.

Also, I think that hex codes are nicer than octal (if I guess correctly).

> [...]
> > +  { "Japanese era change, 1926, start of first transition's year",
> > +    1926, Jan,   1, Fri, 12, 00, 00, "ja_JP.UTF-8", "%EY",
> > +    "\345\244\247\346\255\24315\345\271\264", 1 },
> 
> These should be \x hex escape sequnces because they then match the output
> from the charmap data (if you choose option (b) above), which makes it
> easier to double check output.

I agree, or "\u" sequences, as Joseph pointed out.

Sorry for my brevity, I hope I will continue later.

Regards,

Rafal


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]