kicad-developers team mailing list archive
Mailing list archive
Re: 6.0 string proposal
I suspect all our platforms use at least 32 bit ints, but even so std::u32string does communicate the intent better.
So change the proposal to that….
> On 30 Apr 2019, at 10:52, Andrew Lutsenko <anlutsenko@xxxxxxxxx> wrote:
> I have no opinion on the matter but would add a reminder that wchar_t is platform and compiler dependent.
> Consider using std::u32string instead of std::wstring if you want all code points to fit into one element.
> On Tue, Apr 30, 2019 at 2:36 AM Jeff Young <jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx>> wrote:
> We had talked earlier about throwing the wxWidgets UTF8 compile switch to get rid of our wxString re-entrancy problems. However, I noticed that the 6.0 work packages doc includes an item for std::string-ization of the BOARD. (While a lot more work, this is a better solution because it also increases our gui-toolkit-choice flexibility.)
> I’d like to propose that we use std::wstring for that. UTF8 should *only* be an encoding format (similar to s-expr). It should never be used internally. That’s what unicode wchar_t’s are for.
> And I’d like to propose that we extend std::wstring-ization to SCH_ITEM and LIB_ITEM. (Then we can get rid of a bunch of our ugly mutex hacks.)
> Mailing list: https://launchpad.net/~kicad-developers <https://launchpad.net/~kicad-developers>
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~kicad-developers <https://launchpad.net/~kicad-developers>
> More help : https://help.launchpad.net/ListHelp <https://help.launchpad.net/ListHelp>