kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #21574
Re: Bug: ThrowIOError with GetChars() formatting parameter
-
To:
kicad-developers@xxxxxxxxxxxxxxxxxxx
-
From:
Wayne Stambaugh <stambaughw@xxxxxxxxx>
-
Date:
Fri, 4 Dec 2015 08:54:31 -0500
-
In-reply-to:
<CAEQqtJzTmCzDAse3atj=SXJXKnffu9CNNVP1NmrUY2qRuPw9PA@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0
Thanks Henner. I'll take a look at it when I get a chance. I'm sure
this isn't the only place this pattern is used. If you have a patch,
please submit it.
Thanks,
Wayne
On 12/3/2015 3:46 AM, Henner Zeller wrote:
> Hi,
> Playing with the spectra import/export, I encountered a bug: in that
> code are constructs such as
>
> ThrowIOError( _("some formatting %s"), GetChars( someWxString ));
>
> They are ultimately dealt with wxString::PrintfV( fmt, args );
>
> The output, however, is not as expected. A someWxString with "REF**"
> was only displayed as "R". Changing the GetChars() to TO_UTF8() works.
>
> I suspect that whatever is returned by GetChars() is not properly
> passed through the var-args argument, while the simple const char* of
> TO_UTF8() does work. I am not sure though if that is the 'right'
> solution as this might be different on Windows ? So I'll leave this to
> someone more knowledgeable in wxString quirks on different platforms
> ...
>
> -h
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References