bitshares1-core icon indicating copy to clipboard operation
bitshares1-core copied to clipboard

Problem if username in local language (non english)

Open testzcrypto opened this issue 10 years ago • 21 comments

Tested version 0.4.15-a Windows 8 (user reports same for Windows 7).

If user name in local language (for example Тест), BitSharesX start with error "An error occurred while trying to start", if you run BitSharesX as administrator it's start but creates 2 additional folders in C:\Users: "C:\Users\Тест\AppData\Roaming\BitShares X\logs" "C:\Users\Тест\AppData\Roaming\BitShares X"

And no "BitShares X" folder at C:\Users\Тест\AppData\Roaming

Looks like problem located in handling Unicode paths in different BitShares modules.

testzcrypto avatar Sep 19 '14 08:09 testzcrypto

You say it made no data dir when you run as a normal user? Can you run it from the command line and copy-paste the output to pastebin and link to it here?

nathanielhourt avatar Sep 19 '14 13:09 nathanielhourt

Yes, as normal user it's can't create data dir, because program looking to create data dir not under regular user profile. Output from bitshares_client.exe under windows user Тест: C:\Program Files (x86)\BitSharesX\bin>bitshares_client.exe Loading blockchain from: C:/Users/╥хёЄ/AppData/Roaming/BitShares X/chain Creating default config file at: C:/Users/╥хёЄ/AppData/Roaming/BitShares X/config.json Logging to file: C:/Users/╥хёЄ/AppData/Roaming/BitShares X/logs/default/default.log Logging RPC to file: C:/Users/╥хёЄ/AppData/Roaming/BitShares X/logs/rpc/rpc.log Logging blockchain to file: C:/Users/╥хёЄ/AppData/Roaming/BitShares X/logs/blockchain/blockchain.log Logging P2P to file: C:/Users/╥хёЄ/AppData/Roaming/BitShares X/logs/p2p/p2p.log error opening log file: C:/Users/╨в╨╡╤Б╤В/AppData/Roaming/BitShares X/logs/default/default.log error opening log file: C:/Users/╨в╨╡╤Б╤В/AppData/Roaming/BitShares X/logs/rpc/rpc.log error opening log file: C:/Users/╨в╨╡╤Б╤В/AppData/Roaming/BitShares X/logs/blockchain/blockchain.log error opening log file: C:/Users/╨в╨╡╤Б╤В/AppData/Roaming/BitShares X/logs/p2p/p2p.log Initializing genesis state from built-in genesis file Please be patient, this will take a few minutes... Successfully re-indexed 0 blocks in 0 seconds. Not starting RPC server, use --server to enable the RPC interface (wallet closed) >>>

testzcrypto avatar Sep 19 '14 13:09 testzcrypto

I'm guessing this is due to the use of char* and std::string in fc's filesystem.cpp in the home_path() and app_path() functions. I imagine the fix would be to use wchar_t* and std::wstring for that little bit until it gets to fc::path which should be unicode-friendly. I don't have a windows box, though, so I can't really work on this...

nathanielhourt avatar Sep 19 '14 14:09 nathanielhourt

Between https://github.com/BitShares/qt_wallet/commit/21748f00564775478522c609884cc75f5f4fa234 and https://github.com/InvictusInnovations/fc/commit/6cddd42cfe5a86ab8e339728bec1aeb07506750f this should be resolved. Can you still reproduce the issue (with BitShares XT, not BitShares X)

nathanielhourt avatar Sep 22 '14 20:09 nathanielhourt

Assuming this is resolved unless we hear otherwise.

nathanielhourt avatar Oct 02 '14 19:10 nathanielhourt

Same problem for File->Export, if you store to path with local language. Please check File->Import also.

testzcrypto avatar Oct 06 '14 22:10 testzcrypto

Resolved: https://github.com/BitShares/qt_wallet/commit/deff9ef0cccb072255e8edf5f70d77c89136218c

nathanielhourt avatar Oct 09 '14 19:10 nathanielhourt

TestZ has reported this issue is back

valzav avatar Oct 27 '14 13:10 valzav

This time if user name in local language (for example Тест), bitshares_client.exe works but Qt client get "Critical error" and not produce any logs. Tested with x86 and x64 versions from https://github.com/dacsunlimited/bitsharesx/releases (BitShares X 0.4.22)

testzcrypto avatar Oct 27 '14 13:10 testzcrypto

Possible effect: https://bitsharestalk.org/index.php?topic=7022.msg164927#msg164927

vikramrajkumar avatar Dec 20 '14 19:12 vikramrajkumar

Is this still happening? Have you tried it with a fresh data dir?

nathanielhourt avatar Jan 06 '15 15:01 nathanielhourt

Yes, it's still happening, it's not a problem with fresh data dir, the problem is local characters in the path, if your Windows user name uses local characters (like Тест) you will see the problem, probably same will happened if you create folder C:\Тест and specify it as --data-dir.

testzcrypto avatar Jan 06 '15 19:01 testzcrypto

Right, I understand, but I've had an issue before where logs weren't being generated correctly because my config.json was generated by an outdated client.

nathanielhourt avatar Jan 06 '15 20:01 nathanielhourt

Just check and I can confirm that this problem happening with v0.4.27.2, it's show error message, no data dir, no log files (%APPDATA% = C:\Users\Тест\AppData\Roaming) if I specify --data-dir - works good.

testzcrypto avatar Jan 06 '15 20:01 testzcrypto

If you specify a data dir with non-ASCII characters, it works?

nathanielhourt avatar Jan 06 '15 20:01 nathanielhourt

bitshares_client.exe works, BitShares.exe fail with error message. Try: bitshares_client.exe --data-dir C:\дата and BitShares.exe --data-dir C:\дата

testzcrypto avatar Jan 06 '15 22:01 testzcrypto

@testzcrypto Is this problem still present in 0.6.x version?

vikramrajkumar avatar Mar 05 '15 23:03 vikramrajkumar

Yes, problem still present in 0.6.2.

testzcrypto avatar Mar 06 '15 01:03 testzcrypto

Possibly related: https://github.com/BitShares/qt_wallet/issues/94

vikramrajkumar avatar Mar 06 '15 18:03 vikramrajkumar

Reproducible in BitShares 0.9.1, Windows username Тест, %APPDATA% = C:\Users*Тест*\AppData\Roaming

testzcrypto avatar May 09 '15 14:05 testzcrypto

Probably same problem with French Windows user name: https://bitsharestalk.org/index.php/topic,16235.msg

testzcrypto avatar May 09 '15 14:05 testzcrypto