Bitcoin Forum
June 26, 2017, 08:59:12 PM *
News: Latest stable version of Bitcoin Core: 0.14.2  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Account names encoding  (Read 1136 times)
tcatm
Sr. Member
****
qt
Offline Offline

Activity: 337


View Profile
January 11, 2011, 04:05:05 AM
 #1

It seems like the RPC interface can't handle account names with non-ASCII characters properly. Copy&paste form listaccount to getaccountaddress will create a new account with yet another name.

Can we restrict accountnames to a limited charset (like [a-zA-Z0-9\-_]) or add UTF-8 support?
1498510752
Hero Member
*
Offline Offline

Posts: 1498510752

View Profile Personal Message (Offline)

Ignore
1498510752
Reply with quote  #2

1498510752
Report to moderator
1498510752
Hero Member
*
Offline Offline

Posts: 1498510752

View Profile Personal Message (Offline)

Ignore
1498510752
Reply with quote  #2

1498510752
Report to moderator
1498510752
Hero Member
*
Offline Offline

Posts: 1498510752

View Profile Personal Message (Offline)

Ignore
1498510752
Reply with quote  #2

1498510752
Report to moderator
According to NIST and ECRYPT II, the cryptographic algorithms used in Bitcoin are expected to be strong until at least 2030. (After that, it will not be too difficult to transition to different algorithms.)
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1498510752
Hero Member
*
Offline Offline

Posts: 1498510752

View Profile Personal Message (Offline)

Ignore
1498510752
Reply with quote  #2

1498510752
Report to moderator
1498510752
Hero Member
*
Offline Offline

Posts: 1498510752

View Profile Personal Message (Offline)

Ignore
1498510752
Reply with quote  #2

1498510752
Report to moderator
1498510752
Hero Member
*
Offline Offline

Posts: 1498510752

View Profile Personal Message (Offline)

Ignore
1498510752
Reply with quote  #2

1498510752
Report to moderator
grondilu
Legendary
*
Offline Offline

Activity: 1134


View Profile
January 11, 2011, 04:22:06 AM
 #2

I don't use accounts much, but UTF-8 would be cool indeed.   (utf-8 is actually always cool)
davout
Legendary
*
Offline Offline

Activity: 1372


1davout


View Profile WWW
January 11, 2011, 08:17:33 AM
 #3

I don't use accounts much, but UTF-8 would be cool indeed.   (utf-8 is actually always cool)
It also needs more cowbell

Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
January 11, 2011, 03:22:43 PM
 #4

Character set issues give me headaches.

So I just ran a test at the command-line, moving 500 testnet bitcoins to an account named "฿"

The account created is named "\u00E0\u00B8\u00BF", which is not what I intended.  E0 B8 BF is the utf-8 representation of the unicode Thai Baht character.

Thinking this through, trying hard not to get a headache...

My terminal window has:  LC_CTYPE=en_US.UTF-8
So when I copy&paste the Thai baht symbol, it is being encoded as UTF-8.

I pass a UTF-8 string to bitcoind, and it uses the JSON-Spirit library to convert it into a JSON string (which is defined to be Unicode... encoded using backslashes, I think: see http://www.ietf.org/rfc/rfc4627.txt ).  And there's the bug.  Maybe.  I think?

Command-line bitcoind should be looking at the locale and converting JSON strings to/from that locale.  Anybody motivated enough about internationalized account names (and send comments) to teach it to do that?

How often do you get the chance to work on a potentially world-changing project?
marcusaurelius
Jr. Member
*
Offline Offline

Activity: 37



View Profile
January 11, 2011, 08:42:01 PM
 #5

that is something opaque to john user with the mainline client, right? if not, please point me in the right direction.

--
1Bo3Nqu1rKWvDzHmZJ7GD2BGnsg6YoqzPr
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
January 11, 2011, 09:25:56 PM
 #6

RE: point you in the right direction:

File rpc.cpp, the CommandLineRPC method:

I suspect what needs to be done is to properly JSON encode any strings passed via the command line.

And then properly decode/recode any strings returned from the JSON RCP call before printing out the result.

How often do you get the chance to work on a potentially world-changing project?
tcatm
Sr. Member
****
qt
Offline Offline

Activity: 337


View Profile
January 11, 2011, 09:35:13 PM
 #7

It's probably not only the CommandLineRPC method that causes problems. UTF-8 account names created from js-remote are wrong, too.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!