After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 709058 - Meld does not run if the user profile contains Unicode characters.
Meld does not run if the user profile contains Unicode characters.
Status: RESOLVED FIXED
Product: meld
Classification: Other
Component: general
git master
Other Windows
: Normal minor
: ---
Assigned To: meld-maint
meld-maint
Depends on:
Blocks:
 
 
Reported: 2013-09-29 23:24 UTC by Charley Peng
Modified: 2013-10-18 08:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fixes the issue (1.40 KB, patch)
2013-09-30 08:17 UTC, Charley Peng
none Details | Review
Corrected Patch (1.56 KB, patch)
2013-10-01 06:31 UTC, Charley Peng
none Details | Review
Decode patch (1.36 KB, patch)
2013-10-11 22:48 UTC, Kai Willadsen
accepted-commit_now Details | Review

Description Charley Peng 2013-09-29 23:24:23 UTC
If you run meld with in an account where the username has Unicode characters it breaks when it tries to create the preferences directory.

I have a fix that uses winreg (I will attach it later)
Comment 1 Charley Peng 2013-09-30 08:17:14 UTC
Created attachment 256054 [details] [review]
fixes the issue

This fix means that Unicode usernames will not be truncated and thus break the creation of the directory for preferences.
Comment 2 Louis 2013-10-01 05:41:05 UTC
The patch will require a little work to go straight up, as it's not valid for linux (the change to recent.py will break)
Comment 3 Charley Peng 2013-10-01 05:42:58 UTC
Shall I change it into an if windows or if path does not exist then try using Unicode path?
Comment 4 Charley Peng 2013-10-01 06:31:54 UTC
Created attachment 256156 [details] [review]
Corrected Patch

Ignore the previous patch. This one should work on Linux as well.
Comment 5 Kai Willadsen 2013-10-01 20:55:42 UTC
Thanks for chasing this down. I'm willing to apply that patch if necessary, but I have to admit that I'd rather not be using _winreg. Could you give an example of a username where this breaks, so that I can test? Also, when it breaks, what is the repr() of the directory that the current code is trying to find?

I'm wondering if we just need to decode from the filesystem encoding or something. The glib docs for g_get_user_data_dir() and friends indicate that this *should* be returning UTF8, so we might just be missing that decode().
Comment 6 Charley Peng 2013-10-01 23:12:28 UTC
I just used a username like 你好 and this broke it. I'll reply to the rest when I get home.
Comment 7 Charley Peng 2013-10-11 14:55:28 UTC
Review of attachment 256156 [details] [review]:

pretty bad.
Comment 8 Charley Peng 2013-10-11 14:55:28 UTC
Review of attachment 256156 [details] [review]:

pretty bad.
Comment 9 Charley Peng 2013-10-11 14:56:22 UTC
Okay so I just tested and all that's needed is .decode('utf-8')
Comment 10 Kai Willadsen 2013-10-11 22:48:28 UTC
Created attachment 257062 [details] [review]
Decode patch

Could you please test this patch out and let me know how it goes? It will unfortunately move user preferences from roaming to local appdata, but I think it's the sanest available way to actually work consistently.
Comment 11 Charley Peng 2013-10-12 15:12:14 UTC
Review of attachment 257062 [details] [review]:

Looks fine to me.
Comment 12 Kai Willadsen 2013-10-18 08:14:24 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.