Bitcoin Forum
June 30, 2024, 08:55:52 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin URL label encoding  (Read 1172 times)
playtin (OP)
Full Member
***
Offline Offline

Activity: 201
Merit: 101


https://playt.in


View Profile WWW
March 03, 2013, 09:24:40 PM
 #1

In 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 results in "pos"
bitcoin:1PuR9qRJ7BsyeiZPn4EjbG5oH94nkz9you?label=pos%231 results in "pos%231"
Does anybody know how to encode a label?

jim618
Legendary
*
Offline Offline

Activity: 1708
Merit: 1066



View Profile WWW
March 03, 2013, 09:53:28 PM
 #2

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

MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
playtin (OP)
Full Member
***
Offline Offline

Activity: 201
Merit: 101


https://playt.in


View Profile WWW
March 03, 2013, 09:56:04 PM
 #3

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.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!