[rb-general] BUILD_PATH_PREFIX_MAP code examples and test cases

Ximin Luo infinity0 at debian.org
Tue Jan 31 09:57:00 CET 2017


Daniel Shahaf:
> [..]
> 
> I also agree that all implementations should be required to behave the
> same way on strings that can't be produced by the encoder, such as '%%+'
> or '%x'.  However, my first preference would be to specify that
> consumers <rfc2219>must</rfc2219> reject such strings with an error
> message.  That is: I would require consumers to be strict in what they
> accept.
> 

I had left this out originally, because the cleanest way I could think of, to implement this in a high-level language, was to regex-match for /%[^pec]|%$/ and I was trying to avoid the need for regexes. But I suppose a single check isn't too bad.

If you can think of a better way to do it, let me know.

> Have we run this encoding past windows folks?  The character '%' is
> special to batch scripts, so it would be good to ensure windows build
> scripts can handle the encoding scheme we're discussing here.  (Or if
> they can't, to use «\» or «@» or whatever else instead of «%».)  We
> don't have to check this right now, but we should check this before
> releasing v1.0 of the spec.
> 
> [..]
> 

It looks like you can write %% instead, if doing it manually. Or use EnableDelayedExpansion if you need to do anything more complex with % characters.

https://stackoverflow.com/questions/14718591/escape-percent-signs-in-given-variables

Ack on the other points. Thanks!

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git


More information about the rb-general mailing list