kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #40358
Re: 6.0 string proposal
-
To:
Jeff Young <jeff@xxxxxxxxx>
-
From:
Wayne Stambaugh <stambaughw@xxxxxxxxx>
-
Date:
Tue, 30 Apr 2019 09:55:09 -0400
-
Autocrypt:
addr=stambaughw@xxxxxxxxx; prefer-encrypt=mutual; keydata= mQGiBEM0hxQRBAC2fNh3YOVLu1d5GZ0SbrTNldGiGnCJPLqzEnqFX9v6jmf33TMt6EmSLkl6 Wtfkoj0nVwKxcYmJkA8DX0QAokBkwNIzhSsBzQvthBLIk/5LnPVVKrEXOcL4mUyH1doKlkaE slgJozNa6Av+oavcvD02o1zJOloBbaHlNlyRt7fKswCgtIFlVjWggVH/15KfWk+Qo5JVPbME AIUBAQyL2OAx0n60AWec2WHnO9buHuG0ibtICgUMkE+2MRmYyKwYRdyVwGoIUemFuOyHp0AJ InX4T+vy2E7vkwODqjtMLfIoRkokW74Fi4nrvjlhOAw/vdq/twLbAmR9MOfPTpR4y7kQy1O2 /n+RkkRvh26vTzfbQmrH7cBJhk6aA/9Uwvu3E4zNJgHVZeS0HyWtmR1eOPPRbnkPgJTToX5O KMKzTJI/FX6kT7cFoCamitHrW3BJP4Dx+cMMsa47EGxqVTdbVJ4LjogsXTXxb+0Fn1u4zBdx x3Cer6O7+hqWy7zvpzeC6nSREjqDKa5CgHtv/GLm5uFPOmsjAsnHj2tlBrQmV2F5bmUgU3Rh bWJhdWdoIDxzdGFtYmF1Z2h3QGdtYWlsLmNvbT6IeAQTEQIAOBYhBOffs6CbblRzBkv33BtR cWlZ+CReBQJbFBS2AhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEBtRcWlZ+CReMI8A nRbrLkzp7+c2f0vX7sfg4ICX8LAKAJ9uClo4uJajmZa5zZrL2nKdZlUwIrkCDQRDNIcxEAgA gCru+3/aOC6RCjpvYC72wY+d5SmHphC6yeiV2/mOumyt5MLo/Ps2GznZr11JspqFk5K/Zpvp MMLqqjDZ39+50a2iKRQFJ6NlK+hJWMmj6eJygQrCwYo3Gjc6CqfrqUv+8VSnf/i5sIZmtOVA 4ZjML18MuBvMSsNdVLFJd5HNnYb1iOECpvqdPVh/21LLCEw7MUUGGnHBhCrmk2aJe5hFmcSN g4ldBcXrgMQBwf7aMVoobXBMFDb/IENByXn0llB7Gr2IFMRmNS9/p8s/II1Yl2bTqyX4FSz8 cfn7C9KEz7faZ7wzAcpwHFC/zs3JoAjJ0IEKdNUpIwAlKMzT3CzctwADBQf/cxpG28MKyrqk nNmq/8LQLy+x6FSYXBLjxQz9BiBNYeesDZQ6J5UbL1mjpJzMa5tLZypPYo4bbGyR22hrbyDF K7m6AcVaMIJKl98g4ukMutFfAJyRDaREH5Zl/X1P4u1Z/yaAIy9mKaNbaK1/5djNJ5wCTFen TUgAp9xdc30kGkFDdLJFp5uxDY4P0vaZiZdjUCvDM3Zjv5IzpNOfxVqTUBQNUP/BnnKhkk0p DTD6s3X8S+D0rOtEBQ8K0cwERI/E8EFa8nj0TNw4e2MYGR8wg+SxqJ7z5f0zPY0bO6G9DDFB wYCqzzPWGqdAh9vA5971TAbPERtdFybhkurozp2SfYhJBBgRAgAJBQJDNIcxAhsMAAoJEBtR cWlZ+CResHUAniULLCWiT26ieRTl7N2vS6vBo/DuAJ4m7Ss/gyiW6ybTn1ctDXAUgm2QVQ==
-
Cc:
kicad-developers@xxxxxxxxxxxxxxxxxxx
-
In-reply-to:
<2CFBD4A9-5C6D-4634-A726-CE8312C09F14@rokeby.ie>
-
Openpgp:
preference=signencrypt
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1
What about translated strings? Is changing them from wxString to
u32string going to be an issue? I know this doesn't effect the file I/O
strings but it is something we are going to have to consider if we are
going to punt wxString.
On 4/30/19 9:27 AM, Jeff Young wrote:
> Sure, but we’re going to be re-writing the parsers and formatters for
> s-expr so it’s going to be all different code anyway. (Granted the new
> code could have used the old infrastructure, but I think we need to wean
> ourselves from wxString either way.)
>
>> On 30 Apr 2019, at 13:59, Wayne Stambaugh <stambaughw@xxxxxxxxx
>> <mailto:stambaughw@xxxxxxxxx>> wrote:
>>
>> Given that std::wstring is platform dependent, I would be opposed to
>> using it. I'm not opposed to std::u32string but UTF8 is pretty well
>> vetted so please keep that in mind. I think the possibility of breakage
>> is low but I'm not naive enough to think that it's zero. You would have
>> to do some serious testing to ensure the conversion of std::u32string to
>> and from UTF8 isn't broken before I would be comfortable merging it into
>> master.
>>
>> Wayne
>>
>> On 4/30/19 7:32 AM, Jeff Young wrote:
>>> 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….
>>>
>>> Cheers,
>>> Jeff.
>>>
>>>> On 30 Apr 2019, at 10:52, Andrew Lutsenko <anlutsenko@xxxxxxxxx
>>>> <mailto:anlutsenko@xxxxxxxxx>
>>>> <mailto:anlutsenko@xxxxxxxxx>> wrote:
>>>>
>>>> Hi,
>>>> 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.
>>>>
>>>> Regards,
>>>> Andrew
>>>>
>>>> On Tue, Apr 30, 2019 at 2:36 AM Jeff Young <jeff@xxxxxxxxx
>>>> <mailto: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
>>>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>> More help : https://help.launchpad.net/ListHelp
>>>>
>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help : https://help.launchpad.net/ListHelp
>>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References