Bugs item #1873675, was opened at 2008-01-17 07:44 Message generated for change (Comment added) made by sborho You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=968354&aid=1873675&group_id=199155
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: overlay icons Group: None >Status: Closed Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Can't handle chinese file name (cp950) Initial Comment: Hi, When I explorer a repository that only have ascii code file name, the overlay icon is ok. But I explorer a repository that have chinese name, the overlay icon is missing. I open Python trace collector, I found many errors as below. =========================================== Traceback (most recent call last): File "win32com\server\policy.pyc", line 332, in _InvokeEx_ File "win32com\server\policy.pyc", line 593, in _invokeex_ File "tortoise\iconoverlay.pyc", line 228, in IsMemberOf File "tortoise\iconoverlay.pyc", line 120, in _get_state File "mercurial\util.pyc", line 921, in write <type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode characters in position 3-6: ordinal not in range(128) pythoncom error: Unexpected gateway error Traceback (most recent call last): File "win32com\server\policy.pyc", line 332, in _InvokeEx_ File "win32com\server\policy.pyc", line 593, in _invokeex_ File "tortoise\iconoverlay.pyc", line 228, in IsMemberOf File "tortoise\iconoverlay.pyc", line 168, in _get_state File "ntpath.pyc", line 102, in join <type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode byte 0xbd in position 29: ordinal not in range(128) pythoncom error: Unexpected gateway error ============================================= I have tried to solve the util.pyc, At line 34, _encoding = locale.getpreferredencoding() or 'ascii' At line 36 _encoding = 'ascii' At line 38 _fallbackencoding = 'ISO-8859-1' I changed 'ascii' and 'ISO-8859-1' to 'cp950'. Then I don't get error of 'mercurial\util.pyc'. But I don't know how to solve the error of 'File "ntpath.pyc", line 102, in join'. I know this kind of solution is ugly. So please help me. I attach the repository that contain chinese file name inside. Hope this zip can help you. ---------------------------------------------------------------------- >Comment By: Steve Borho (sborho) Date: 2009-03-05 00:58 Message: please open a new bug if this is still an issue make sure you try the win32mbcs extension first ---------------------------------------------------------------------- Comment By: TK Soh (tksoh) Date: 2008-01-28 06:41 Message: Logged In: YES user_id=411637 Originator: NO Can you upload a sample repo that will create the issue, so that I can look into the fix? Thanks. ---------------------------------------------------------------------- Comment By: ngong (rolf_schumacher) Date: 2008-01-28 06:04 Message: Logged In: YES user_id=715181 Originator: NO It seems that tortoiseHg can not recognize any special characters in filenames. I do have the same Problem with German repository names, even if the appear only in the full path name. What I did: Registered a repository at D:\Büro\Repository. Tried to clone it with tortoiseHg to D:\Büro\Clone. Successfully filled in all names into the clone dialog window. Pressed button "clone" What I expected: To get a repository clone at D:\Büro\Clone What I got: An error message: *** repository D:\Büro\Repository not found Workaround: I can clone the repository on the command line with hg clone D:\Büro\Repository D:\Büro\Clone ---------------------------------------------------------------------- Comment By: TK Soh (tksoh) Date: 2008-01-21 20:26 Message: Logged In: YES user_id=411637 Originator: NO Looks like Windows/Explorer passes the path to the shell extensions in unicode format. If I encode the path in 'mbcs' before handing to Mercurial, it could get rid of the traceback and overlay icons are displayed correctly in your sample repo. I'll give it more test before I check in the fix. ---------------------------------------------------------------------- Comment By: TK Soh (tksoh) Date: 2008-01-17 08:01 Message: Logged In: YES user_id=411637 Originator: NO I got the errors using your repo. But this is a little strange, as tortoise/test/testiconoverlay.py doesn't seem to have any problem on the same repo. I will take a closer look. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=968354&aid=1873675&group_id=199155 ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Tortoisehg-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop
