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

Drag and drop a file from Dolphin is now working even if the file has… #450

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
2 participants
@jmtrivial
Copy link
Contributor

commented May 12, 2019

… utf8 non-latin1 characters in its name.

This fix corresponds to bug ID 0007253

@x42

This comment has been minimized.

Copy link
Member

commented May 12, 2019

Nice find! Yet, I think that should probably be Glib::locale_to_utf8(). ISO-8859-1 is not usually the default.

e.g. In my case the system is using en_US.UTF-8 and the [ext3] file-system is also UTF8.

What is the output of locale on your system?

@jmtrivial

This comment has been minimized.

Copy link
Contributor Author

commented May 12, 2019

My locale is fully utf8 :

LANG=fr_FR.UTF-8
LANGUAGE=
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=

But I think (not sure) that when you drag'n drop a file from dolphin, the file names are encoded in utf8, rather than encoded in uri from nautilus. I suppose that gtk considers that it should be uri encoded (then in latin1 I suppose, in 8 bits), then split the utf8 characters into two characters when it comes from dolphin.
I'm not enough an expert in gtk to check how it works...

@jmtrivial

This comment has been minimized.

Copy link
Contributor Author

commented May 12, 2019

Try on your system with a file named "téléchargement.wav" for example, and see what appends by writing in the console data.get_text() when the file come from a drag'n drop from nautilus, then from dolphin.

@jmtrivial

This comment has been minimized.

Copy link
Contributor Author

commented May 13, 2019

Ok, I think I found the correct bugfix. I close this pull request and create a new one.

@jmtrivial jmtrivial closed this May 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.