@bravosx: Please install the attached junk plugin, run it (via Plugins > Edit > junk) and post the results.
@slowsmile: You can use
locale.getpreferredencoding() to detect the code page of Windows machines and use it with
decode(). If the junk plugin reports a code page other than cp1252 for
bravosx, you might be able to use this information to make your plugin more "bulletproof."
If it doesn't the problem is most likely caused by something else.
BTW, the junk plugin uses the following code:
For example, on my Windows machine I got the following results:
Code:
OS: win32
Platform: Windows-10-10.0.14393-SP0
Python Version: 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)]
Preferred Encoding: cp1252
and on my Linux machine I got:
Code:
OS: linux
Platform: Linux-4.8.13-1-ARCH-x86_64-with-arch
Python Version: 3.6.0 (default, Dec 24 2016, 08:03:08) [GCC 6.2.1 20160830]
Preferred Encoding: UTF-8