Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: playtin on March 03, 2013, 09:24:40 PM



Title: Bitcoin URL label encoding
Post by: playtin on March 03, 2013, 09:24:40 PM
In https://en.bitcoin.it/wiki/URI_Scheme (https://en.bitcoin.it/wiki/URI_Scheme) is stated:
Quote
Characters must be URI encoded properly.
However, this does not seem to work.
Say we need to label this "pos#1"
bitcoin:1PuR9qRJ7BsyeiZPn4EjbG5oH94nkz9you?label=pos#1 (bitcoin:1PuR9qRJ7BsyeiZPn4EjbG5oH94nkz9you?label=pos#1) results in "pos"
bitcoin:1PuR9qRJ7BsyeiZPn4EjbG5oH94nkz9you?label=pos%231 (bitcoin:1PuR9qRJ7BsyeiZPn4EjbG5oH94nkz9you?label=pos%231) results in "pos%231"
Does anybody know how to encode a label?


Title: Re: Bitcoin URL label encoding
Post by: jim618 on March 03, 2013, 09:53:28 PM
You need to decode the encoded version afterwards to use it as normal text

I just tried it in MultiBit.

Type in a label "pos#1".
If you scan the QR code generated you get "... &label=pos%231"

Copy and paste the QR code to another wallet and your label gets decoded back to "pos#1"

It is the same with foreign languages.
Chinese label of "你好!" ("ni hao !" = "Hello!") => &label=%E4%BD%A0%E5%A5%BD%21

(the unicode of "ni hao !" I think)

=> 你好! after decoding


Title: Re: Bitcoin URL label encoding
Post by: playtin on March 03, 2013, 09:56:04 PM
You need to decode the encoded version afterwards to use it as normal text
My point was that apparently Bitcoin-QT does not do this.