Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MS Windows and utf-8 issues #172

Open
GoogleCodeExporter opened this issue May 4, 2015 · 7 comments
Open

MS Windows and utf-8 issues #172

GoogleCodeExporter opened this issue May 4, 2015 · 7 comments

Comments

@GoogleCodeExporter
Copy link

Windows XP doesn't use utf-8.

I press an accentuated letter to tag a photo (é, à, ç) and i have a python 
error ("can't decode byte").

In the folder "tést" (accentuated letter), i right click on a photo / 
operations / open in explorer, i get an error message from the Windows Explorer 
saying that the folder "tést" doesn't exist.

jbrout 0.3.284, Win XP
(Are these bugs present in vista and seven?)

Original issue reported on code.google.com by [email protected] on 12 Oct 2010 at 11:12

@GoogleCodeExporter
Copy link
Author

An other little thing.
Under windows, you can do Alt+0201 (on the numpad) to produce a É.
This thing doesn't work with a jbrout textbox.
Not sure we can do something about it.

Original comment by [email protected] on 22 Oct 2010 at 5:03

@GoogleCodeExporter
Copy link
Author

For the openExplorer bug ("tést" doesn't exist)

## in plugins\openExplorer\__init__.py

runWith(["xdg-open","nautilus","rox","konqueror","explorer.exe"],unicode(node.fi
le).encode('cp1252'))

runWith(["xdg-open","nautilus","rox","konqueror","explorer.exe"],path.encode('cp
1252'))

## in jbrout\common.py
remove the line 58 (in r320), in runWith()
assert type(file)==unicode

I just added .encode('cp1252') before calling runWith, so the explorer gets a 
CP-1252 filename and can find it.
It's a hard fix, only valid under windows.
This works under Win XP, but the filesystem encoding needs to be known before 
to be sent.
We could try if sys.platform[:3].lower() == "win":, but it could lie with 
windows partition mounted under linux, and i don't know the charset of Vista 
ans Seven.

Original comment by [email protected] on 7 Nov 2010 at 4:01

@GoogleCodeExporter
Copy link
Author

(In reply to comment #1)
> This thing doesn't work with a jbrout textbox.
> Not sure we can do something about it.

This is most likely bug in Gtk+ ... http://is.gd/7DCazu

Original comment by [email protected] on 6 Dec 2011 at 10:45

@GoogleCodeExporter
Copy link
Author

(In reply to comment #2)
> 
runWith(["xdg-open","nautilus","rox","konqueror","explorer.exe"],unicode(node.fi
le).encode('cp1252'))

This is certainly not acceptable as it is, but we can try to generalize it a 
bit. What do you get when you run (inside of python)

import locale
print locale.getpreferredencoding()

Thank you

Original comment by [email protected] on 6 Dec 2011 at 10:48

@GoogleCodeExporter
Copy link
Author

on windows : it's better to use "mbcs" in place of cp1252 ...

Original comment by [email protected] on 6 Dec 2011 at 10:59

@GoogleCodeExporter
Copy link
Author

(In reply to comment #5)
> on windows : it's better to use "mbcs" in place of cp1252 ...

Sure, but I was after an universal solution which would work on Mac and Linux 
as well.

Original comment by [email protected] on 6 Dec 2011 at 11:13

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 12 Aug 2013 at 10:22

  • Changed state: Accepted
  • Added labels: OpSys-Windows, Priority-Medium, Type-Defect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant