bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] xgettext seems unable to deal concatenated wide char strings


From: Érico Nogueira
Subject: Re: [BUG] xgettext seems unable to deal concatenated wide char strings
Date: Sat, 14 Nov 2020 15:18:35 -0300

On Sat Nov 14, 2020 at 4:01 PM -03, Bruno Haible wrote:
> Hi Érico,
>
> > Hi! I noticed this issue while working on translations for the
> > fish-shell [1], which makes heavy usage of wide char strings.
> > 
> > - [1] https://github.com/fish-shell/fish-shell
> > 
> > My xgettext version is 0.20.2.
> > 
> > Starting from a C file such as:
> > 
> >     int main()
> >     {
> >             gettext(L"single line");
> > 
> >             gettext(L"double "
> >                             L"line ");
> > 
> >             gettext(L"single line but" L" split");
> > 
> >             gettext("double line"
> >                             " non wide");
> >     }
>
> Thanks for the report. This will be fixed in the next release, through
> this commit:
>
> https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=1a5081fda1e4dfefcf727df7aa812f0b92f7977b

Thank you very much! I tried debugging it and moving around some stuff
to see where it was happening, but I didn't manage to grok the code.

>
> Note, however, that you can better write reliable programs with 'char *'
> strings than with 'wchar_t *' strings [1].
>
> Bruno
>
> [1]
> https://www.gnu.org/software/libunistring/manual/html_node/The-wchar_005ft-mess.html

Thank you for the link. I do use only 'char *' strings for my own
projects, but I don't think fish would manage to make a switch from wide
chars. Fortunately, it seems to be working well enough for them.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]