Commit dialog filter has issue with special symbols

Peer Sommerlund avatarPeer Sommerlund created an issue

This issue occurred when I had the commit dialog open, and wanted to filter on "@" but by mistake hit two keys resulting in filter "@£"

Behind the crash report dialog, I can see the commit dialog has filtered the file list according to "@". There would be no matches if the filter were "@£".

After pressing OK on the crash report dialog, the commit dialog continues to function.

The crash is reproducible by simply entering "£" (British Pound sign) - on my keyboard reachable via AltGr-3

The repository is on a network folder. My OS is Windows 7, 32 bit.

** Mercurial version (2.3.1).  TortoiseHg version (2.5)
** Command: --nofork commit
** CWD: T:\Project sites\SKABELONER
** Encoding: cp1252
** Extensions loaded: mq
** Python version: 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]
** Windows version: sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1')
** Processor architecture: x86
** Qt-4.8.0 PyQt-4.9.1
Traceback (most recent call last):
  File "tortoisehg\hgqt\status.pyo", line 354, in setFilter
  File "tortoisehg\hgqt\status.pyo", line 805, in setFilter
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa3 in position 1: ordinal not in range(128)

Comments (2)

  1. Yuya Nishihara

    I guess \u0080 to \u00ff are handled differently.

    # 0080-00ff raise UnicodeDecodeError
    >>> unicode(QString(u'£'), 'ascii')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xa3 in position 0: ordinal not in range(128)
    # but 0100- are just replaced to ?
    >>> unicode(QString(u'\u0100'), 'ascii')
    u'?'
    
  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.