Created attachment 70174 [details] Proposed patch It is impossible to launch command with national charachters in path via "-e" konsole switch. As for me, the problem is caused by using toLatin1() in Pty::start() when invoking setProgram() and also not setting proper QTextCodec for c-strings. Attached patch fixes the issue but I don't know is it correct way to do that with respect to QTextCodec. Maybe QTextCodec adjusting has to be moved to KonsolePart instantiation?
Thanks for reporting and the patch. I think your analysis and patch is fine for stand-alone Konsole. For konsoelpart, calling QTextCodec::setCodecForCStrings() might be problematic since that would also influence the hosting appliations(?). @Kurt, what is your idea?
Let me try to set this up to test it. There's some thought using toLocal8Bit() might work. Eugene ,what's the full command you're trying to use?
Hi Kurt: It is not hard to setup a test $ cd /tmp $ cp `which vi` ./编辑器 $ konsole -e ./编辑器
Created attachment 70286 [details] New patch Can you try this? The QTextCodec::setCodecForCStrings is not the way to do this. Also, the encodeName() doesn't make any sense and I'm not sure why it was in there.
(In reply to comment #4) this patch works, thanks. I also was in doubt because of the encodeName() invocation and decided to set codec :)
Git commit 3ceb32461c107dd3feb315a4a4022acad72612ec by Kurt Hindenburg. Committed on 10/04/2012 at 17:22. Pushed by hindenburg into branch 'master'. Allow non-English for program names; useful w/ -e The old code used Latin1() to check program names and also used QFile::encodeName(). Thanks to Eugene Shalygin for report and research. Example: cp `which vi` ./编辑器 konsole -e ./编辑器 FIXED-IN: 2.8.3 M +1 -1 src/Pty.cpp M +3 -3 src/Session.cpp http://commits.kde.org/konsole/3ceb32461c107dd3feb315a4a4022acad72612ec
Git commit fe726be565e3445e4cfaa6ec5eeabd1064bb280b by Kurt Hindenburg. Committed on 24/04/2012 at 14:58. Pushed by hindenburg into branch 'KDE/4.8'. Allow non-English for program names; useful w/ -e The old code used Latin1() to check program names and also used QFile::encodeName(). Thanks to Eugene Shalygin for report and research. Example: cp `which vi` ./编辑器 konsole -e ./编辑器 FIXED-IN: 2.8.3 cherry-picked from 3ceb32461c107dd3feb315a4a4022acad72612ec M +1 -1 src/Pty.cpp M +1 -1 src/Session.cpp http://commits.kde.org/konsole/fe726be565e3445e4cfaa6ec5eeabd1064bb280b