kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #37687
Re: Character limitations in names
-
To:
Jeff Young <jeff@xxxxxxxxx>
-
From:
Wayne Stambaugh <stambaughw@xxxxxxxxx>
-
Date:
Fri, 28 Sep 2018 07:50:48 -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:
<351B929B-CE2A-4203-92D6-6AE6AC88D0BE@rokeby.ie>
-
Openpgp:
preference=signencrypt
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
That would solve the colon problem but not the other illegal file name
characters such as '/' and '\'. I would like to have a fix for all of
the characters that we currently convert to '_'. I suppose that we
could use a solution like this for all illegal characters but it would
be a bit verbose (read less human readable).
On 09/27/2018 04:31 PM, Jeff Young wrote:
> Right, but that only requires changes to the LIB_ID parser because the ‘:’ character still appears in the escape sequence.
>
> Imagine that we encoded it as “lib_name_with{colon}:item_name{colon}with_colon”, then no changes in parser required, and older versions of kicad would handle it OK (they’d just display the longer syntax in dialogs, etc.). Newer versions could show the shorter syntax (just the ‘:’) everywhere it wasn’t ambiguous.
>
>> On 27 Sep 2018, at 19:25, Wayne Stambaugh <stambaughw@xxxxxxxxx> wrote:
>>
>> Hey Jeff,
>>
>> In this case you are going to have to prevent the colon character from
>> being using in LIB_ID names because the LIB_ID parser uses the colon to
>> separate the library name from the item name. I was thinking that we
>> could quote the colon so that a string like
>> "lib_name_with\:_colon:item_name\:with_colon" would be parsed as a
>> library named "lib_name_with:colon" and an item named
>> "item_name:with_colon. This requires a change in the LIB_ID parser and
>> formatter and and libraries created this way would not be compatible
>> with older versions of kicad.
>>
>> Cheers,
>>
>> Wayne
>>
>> On 9/27/2018 2:05 PM, Jeff Young wrote:
>>> Hi Wayne,
>>>
>>> Yes, I was around for the quoting discussion, but this current idea was not just for spaces but for filename-illegal-characters as well. Instead of quoting:
>>>
>>> this is my/filename
>>>
>>> we could write out:
>>>
>>> this is my&fasl;filename
>>>
>>> which uses XML-entity-references and doesn’t require any file-format changes. There’s also %-encoding (commonly used in URLs) which would look like:
>>>
>>> this%20is%20my%2Ffilename
>>>
>>> While neither is terribly readable, it’s a corner case and if the user really wants odd characters in their names then it’s about all we can do.
>>>
>>> But then I ran into the ‘:’ problem.
>>>
>>> Cheers,
>>> Jeff.
>>>
>>> PS: I’m still OK with the “punt” option; I just wanted to explain that it doesn’t need any file format changes.
>>>
>>>
>>>> On 27 Sep 2018, at 17:49, Wayne Stambaugh <stambaughw@xxxxxxxxx> wrote:
>>>>
>>>> We cannot change LIB_IDs until the new schematic file format is
>>>> implemented because the symbol LIB_ID is not saved as a quoted string.
>>>>
>>>> In pcbnew, the footprint library name is the file name so that is all
>>>> together different issue. We can quote file names like urls but we
>>>> still have to change the LIB_ID parsing and formatting to handle this in
>>>> the board file which would effectively require a file format change.
>>>>
>>>> I'm pretty sure we've discussed this as part of v6 but maybe that was
>>>> before you joined the project. Long story short, abandon the idea until
>>>> all the pieces are in place to implement it correctly.
>>>>
>>>> Cheers,
>>>>
>>>> Wayne
>>>>
>>>> On 9/27/2018 12:15 PM, Jeff Young wrote:
>>>>> I had planned to get rid of another of our nanny items (“illegal” characters in names). The plan was to escape these strings coming in from the UI, and unescape them going out to the UI (or to canvas painting routines).
>>>>>
>>>>> But I ran into a snag: we let you edit the FPID in the GUI, and that has the colon in it. So there’s no way to know whether a colon coming in from that is the separator or needs to be escaped.
>>>>>
>>>>> Things we could do:
>>>>>
>>>>> 1) abandon the idea
>>>>> 2) do everything but colon
>>>>> 3) present FPIDs unescaped in the GUI
>>>>> 4) something else more clever than what I’ve come up with
>>>>>
>>>>> If we do (2) or (3), there’s also the question of the encoding system. %-encoding is the easiest, but the least human-readable. An entity-encoding-style syntax with our own names (cf: &forward-slash;) would be the most human-readable, but isn’t standard. Entity-encoding using XML names (cf: &fasl;) is somewhere in between (and is what I’d lean toward).
>>>>>
>>>>> Thoughts?
>>>>>
>>>>> Cheers,
>>>>> Jeff.
>>>>> _______________________________________________
>>>>> 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
>>>>>
>>>>
>>>> _______________________________________________
>>>> 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