johnturek / advanced-find

Automatically exported from code.google.com/p/advanced-find
0 stars 0 forks source link

Unicode Decode Error #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set advanced-find with the following parameters:

Find what: font
Replace with:

Filter: *
Directory: /home/moi/classements/tests

Match whole word: no
Match case: no
Wrap around: no
Directory follow current doc.: yes
Directory include sub-folder: yes
Regular expression: no

Direction: Forward

Scope: All Documents in Directory

Opacity: 100%

2. Click on "Find All".

What is the expected output?
With grep in a terminal, I find 7 results.

What do you see instead?
advanced-find crashes. In a terminal, the output is:

Traceback (most recent call last):
  File "/home/moi/.local/share/gedit/plugins/advancedfind/advancedfind_ui.py", line 358, in on_findAllButton_clicked_action
    self._instance.find_all_in_dir(it, dir_path, file_pattern, search_pattern, self._instance.find_options)
  File "/home/moi/.local/share/gedit/plugins/advancedfind/advancedfind.py", line 540, in find_all_in_dir
    file_uri = ('file://' + file_path).encode('utf-8')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 78: 
ordinal not in range(128)

What version of the product are you using?
advanced-find 3.3.0

On what operating system?
Xubuntu 11.10

Original issue reported on code.google.com by cont...@jpfleury.net on 26 Nov 2011 at 9:28

GoogleCodeExporter commented 9 years ago
I've just noticed that the problem occurs when there's a folder or a file with 
accents in the name, for example:

/home/moi/classements/tests/École/
/home/moi/classements/tests/vérifié.txt

or with some other characters in the name, for example:

/home/moi/classements/tests/«fichier».txt

Original comment by cont...@jpfleury.net on 27 Nov 2011 at 4:36

GoogleCodeExporter commented 9 years ago
I will fix this at next release.

Original comment by swatch.c...@gmail.com on 27 Nov 2011 at 4:44

GoogleCodeExporter commented 9 years ago
Fixed at v3.3.1.

Original comment by swatch.c...@gmail.com on 27 Nov 2011 at 8:39