Closed RCasatta closed 5 months ago
oh it looks my android phone is not considering the uppercase scheme correctly, so I think sadly we have to upgrade rust-bitcoin...
There is a non-negligible advantage in using the scheme uppercase since would allow to keep to Alphanumeric mode for the first part of the URI
We discussed this in this issue right here.
I collected a ton of data (shared in that issue's discussion), testing not only for wallet compatibility but also the size of the resultant QR. The tool I was using uses mixed modes, meaning it encodes some part of the string alphanumerically and others with whatever the most space efficient mechanism is.
So, my conclusion was to not uppercase the scheme because not many wallets supported it and when using mixed modes the size difference was negligible. See the data I shared in that discussion.
Willing to open the discussion again if my data is inaccurate or there are other relevant points we missed.
The tool I was using uses mixed modes, meaning it encodes some part of the string alphanumerically and others with whatever the most space efficient mechanism is.
That doesn't mean there wouldn't be space saving, a header switch would be saved, but yeah the advantages are small and disantvantages big, indeed I switched rust-bitcoin to encode the scheme lower-case
From https://en.wikipedia.org/wiki/Uniform_Resource_Identifier
Even though the canonical form is lowercase, the uppercase form should be ok since the schemes are case-insensitive.
There is a non-negligible advantage in using the scheme uppercase since would allow to keep to Alphanumeric mode for the first part of the URI
rust-bitcoin is using an uppercase scheme for bech32 addresses, https://github.com/rust-bitcoin/rust-bitcoin/blob/7c6a7c34b87fa92e6432247e3ce909333ef44d05/bitcoin/src/address.rs#L985 we should switch here too, or if there are good reasons to keep it lowercase upgrade rust-bitcoin to be coherent.