[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: extra keys from XS parser not decoded?
From: |
Gavin Smith |
Subject: |
Re: extra keys from XS parser not decoded? |
Date: |
Fri, 25 Feb 2022 07:06:19 +0000 |
On Thu, Feb 24, 2022 at 11:50:51PM +0100, Patrice Dumas wrote:
> Hello,
>
> I have some differences between the perl Parser and the XS parser for
> non ascii strings for extra values. The perl Parser seems to be ok.
>
> My feeling is that the strings are not properly decoded. An analysis,
> that may be completly off, is that SvUTF8_on should be called on
> something, maybe around l 479 in tp/Texinfo/XS/parsetexi/api.c:
>
> case extra_string:
> { /* A simple string. */
> char *value = (char *) f;
> STORE(newSVpv (value, 0));
> break;
> }
>
I think you're right. Any time a string is created it should probably
have the UTF-8 flag set, unless it represents a filename.
> Also maybe there could be a list to avoid decoding strings that should
> not be decoded. For now I spotted one in the perl Parser, but which is
> not in the final tree for now (extra->file for include).
>
> --
> Pat
>