View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007253 | ardour | bugs | public | 2017-02-25 15:53 | 2019-05-12 19:25 |
Reporter | jmtrivial | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | amd64 | OS | GNU/Linux | OS Version | debian sid |
Summary | 0007253: Cannot import files with utf8 characters by drag&drop | ||||
Description | I'm using KDE as window manager, and I'm used to drag&drop wav files from dolphin to ardour to import them. It works perfectly with files that are only containing "basic" characters, but does not work with utf8 characters. | ||||
Steps To Reproduce | 1. Start an ardour session 2. Drag&drop a file with an accent in its name (such as "é") 3. Watch the journal window: [ERROR]: Import?: impossible d'ouvrir le fichier Audio "/media/jm/audio data/banque de sons/piezo/janvier 2017 (alice)/choc métallique et fluctuation 1.wav" | ||||
Tags | No tags attached. | ||||
|
Several tests: * this problem do not append using the "import" dialog * this problem do not append using a drag and drop from nautilus, only from dolphin. I'm not sure, but I suspect that it comes from an error in the utf8 conversion, probably in Editor::convert_drop_to_paths... |
|
I found a way to fix this problem, by using a supplementary conversion of the data.get_text() string before reading file names. On my system, the attached patch works for drag and drops from dolphin and from nautilus. Here is the pull request on github: https://github.com/Ardour/ardour/pull/450 utf8.diff (394 bytes)
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 4f4bee483..682cc281c 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -3313,7 +3313,7 @@ Editor::convert_drop_to_paths ( THERE MAY BE NO NULL TERMINATING CHAR!!! */ - string txt = data.get_text(); + string txt = Glib::convert(data.get_text(), "ISO-8859-1", "UTF-8"); char* p; const char* q; |