Bleachbit does not support UTF8 Windows usernames.

Bug #1347644 reported by Daniel Caban on 2014-07-23
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
BleachBit
High
Unassigned

Bug Description

If I run Bleachbit from console using a username with UTF8 characters (in my example I created a user name ɡælɪk), then a lot of errors are thrown related to the XML files and "'utf8' codec can't decode bytes in position 10-12: invalid data"

I caught this from BleachBit version 1.0:
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 10-12: invalid data
Traceback (most recent call last):
  File "bleachbit\Winapp.pyo", line 116, in __init__
  File "bleachbit\Winapp.pyo", line 201, in handle_section
  File "bleachbit\Winapp.pyo", line 262, in handle_filekey
  File "bleachbit\Winapp.pyo", line 235, in __make_file_provider
  File "bleachbit\Action.pyo", line 97, in __init__
  File "ntpath.pyo", line 430, in expandvars

And here is the full screen display in BleachBit version 1.2:
'utf8' codec can't decode bytes in position 10-12: invalid data
<option id="cache">
    <label>Cache</label>
    <description>Delete the cache</description>
    <action command="delete" path="~/.adobe/Acrobat/*/Cache" search="walk.files"/>
    <action command="delete" path="$localappdata\Adobe\Acrobat\*\Cache" search="walk.files"/>
    <action command="delete" path="$USERPROFILE\AppData\LocalLow\Adobe\Acrobat\9.0\Search\*.idx" search="glob"/>
  </option>
'utf8' codec can't decode bytes in position 10-12: invalid data
<option id="mru">
    <label>Most recently used</label>
    <description>Delete the list of recently used documents</description>
    <action command="delete" path="~/.adobe/Acrobat/*/Preferences/reader_prefs" search="file"/>
    <action command="winreg" path="HKCU\Software\Adobe\Acrobat Reader\5.0\AVGeneral\cRecentFiles"/>
    <action command="winreg" path="HKCU\Software\Adobe\Acrobat Reader\6.0\AVGeneral\cRecentFiles"/>
    <action command="winreg" path="HKCU\Software\Adobe\Acrobat Reader\7.0\AVGeneral\cRecentFiles"/>
    <action command="winreg" path="HKCU\Software\Adobe\Acrobat Reader\8.0\AVGeneral\cRecentFiles"/>
    <action command="winreg" path="HKCU\Software\Adobe\Acrobat Reader\9.0\AVGeneral\cRecentFiles"/>
  </option>
'utf8' codec can't decode bytes in position 10-12: invalid data
<option id="logs">
    <label>Logs</label>
    <description>Delete the logs</description>
    <action command="delete" path="~/.aMule/logfile" search="file"/>
    <action command="delete" path="~/.aMule/logfile.bak" search="file"/>
    <action command="delete" path="$APPDATA\aMule\logfile" search="file"/>
    <action command="delete" path="$APPDATA\aMule\logfile.bak" search="file"/>
  </option>
'utf8' codec can't decode bytes in position 10-12: invalid data
<option id="tmp">
    <label>Temporary files</label>
    <description>Delete the temporary files</description>
    <action command="delete" path="~/.aMule/Temp/" search="walk.files"/>
    <action command="delete" path="$APPDATA\aMule\Temp\" search="walk.files"/>
  </option>
debug: 'C:\BleachBit-Portable-1.2\share\cleaners\amule.xml' is not usable
....continues for hundreds of lines throwing errors about cleaners...
adobe_reader.tmp
deepscan.backup
deepscan.ds_store
deepscan.thumbs_db
deepscan.tmp
firefox.cache
firefox.cookies
firefox.crash_reports
firefox.dom
firefox.download_history
firefox.forms
firefox.passwords
firefox.session_restore
firefox.site_preferences
firefox.url_history
firefox.vacuum
internet_explorer.forms
microsoft_office.debug_logs
openofficeorg.cache
openofficeorg.recent_documents
paint.mru
safari.cache
system.clipboard
system.custom
system.free_disk_space
system.logs
system.memory_dump
system.muicache
system.prefetch
system.recycle_bin
system.tmp
system.updates
tortoisesvn.history
windows_defender.history
windows_explorer.mru
windows_explorer.run
windows_explorer.search_history
windows_explorer.thumbnails
windows_media_player.mru
winrar.mru
winzip.mru
wordpad.mru
yahoo_messenger.cache
yahoo_messenger.chat_logs
yahoo_messenger.logs

Oliver (oliver-assarbad) wrote :

I think Windows is to blame here. There is no way of telling which one is the appropriate codepage to use (because it depends on the context). Can you try whether

  cmd.exe /u

is able to execute it properly?

Andrew Ziem (ahziem1) wrote :

Attached is the stack trace for a related crash in another piece of code. Found on Windows XP with the same username ɡælɪk.

Changed in bleachbit:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → 1.4
Andrew Ziem (ahziem1) wrote :

Oliver, cmd /u does not help me, and I am stuck earlier than Daniel. It may be related to the differences in BleachBit version 1.2 and later.

Andrew Ziem (ahziem1) on 2014-08-08
Changed in bleachbit:
milestone: 1.4 → 1.6
Andrew Ziem (ahziem1) on 2014-10-03
Changed in bleachbit:
milestone: 1.6 → 1.8
Andrew Ziem (ahziem1) on 2015-01-19
Changed in bleachbit:
milestone: 1.8 → 2.0
Andrew Ziem (ahziem1) wrote :

Progress for supporting UTF-8 in BleachBit 1.7.7 (especially for preview and delete functions)
http://bleachbit.sourceforge.net/news/bleachbit-177-beta

More work is probably needed for usernames

Andrew Ziem (ahziem1) wrote :
Changed in bleachbit:
milestone: 2.0 → 1.12
Andrew Ziem (ahziem1) on 2016-01-09
Changed in bleachbit:
importance: Medium → High
Andrew Ziem (ahziem1) wrote :

I wish I could always fix all the bugs, but I am rescheduling because there are already 24 fixes ready for BleachBit version 1.12, so I do not want to delay the fixes that are ready.

Changed in bleachbit:
milestone: 1.12 → 1.14
Andrew Ziem (ahziem1) wrote :

I am offering a bounty for someone to fix this bug, and I posted it on a freelancing site.

tags: added: bounty
Andrew Ziem (ahziem1) wrote :

Daniel, would you soon please test BleachBit 1.13 alpha 1 https://www.bleachbit.org/news/bleachbit-113-alpha-1 ? It has a fix for this

Andrew Ziem (ahziem1) on 2016-10-18
Changed in bleachbit:
status: Confirmed → In Progress
Andrew Ziem (ahziem1) wrote :

I believe it is fixed. If not, please re-open this bug report or a new ticket.

Changed in bleachbit:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers