The mousepad (version 0.4.0) does not open when I try to open a text file that is in a folder with accents. [ p0ng ~ > ~/aááálá ] mousepad êita\ poxá.txt process 1832: arguments to dbus_message_iter_append_basic() were incorrect, assertion "_dbus_check_is_valid_utf8 (*string_p)" failed in file dbus-message.c line 2676. This is normally a bug in some application using the D-Bus library. D-Bus not built with -rdynamic so unable to print a backtrace Aborted (core dumped) In this case, the mousepad opens (the name in UTF-8 format) [ p0ng ~ > ~/Estágio ] mousepad teste.sh [ p0ng ~ > ~/Estágio ] My system is setted in iso-8859-1 (or at least should be) [ p0ng ~ > ~ ] locale -a C en_US.iso88591 POSIX [ p0ng ~ > ~ ] locale LANG=en_US.ISO-8859-1 LC_CTYPE="en_US.ISO-8859-1" LC_NUMERIC="en_US.ISO-8859-1" LC_TIME="en_US.ISO-8859-1" LC_COLLATE="en_US.ISO-8859-1" LC_MONETARY="en_US.ISO-8859-1" LC_MESSAGES="en_US.ISO-8859-1" LC_PAPER="en_US.ISO-8859-1" LC_NAME="en_US.ISO-8859-1" LC_ADDRESS="en_US.ISO-8859-1" LC_TELEPHONE="en_US.ISO-8859-1" LC_MEASUREMENT="en_US.ISO-8859-1" LC_IDENTIFICATION="en_US.ISO-8859-1" LC_ALL= Thanks in advance!
I don't think Mousepad gives any special treatment for filenames (except for GUI display maybe). It seems to use GLib's option parser to get the filenames, then it blindly passes them through to the various GLib functions, which is the right thing to do. What are the exact bytes you're using in your filename? I want to be sure our browsers, bugzillas, terminals, etc are not munging the bytes. You can find the byte numbers here: https://en.wikipedia.org/wiki/ISO/IEC_8859-1#Codepage_layout
It might be this: http://git.xfce.org/apps/mousepad/tree/mousepad/mousepad-dbus.c#n321 If DBus requires UTF-8 and Mousepad is feeding it the arguments in your locale encoding.
Created attachment 6339 Encode filenames passed to DBus as UTF-8 Are you able to test this patch against Git master branch?
Created attachment 6340 Screenshot Now it works!! Attached screenshot showing file correctly recognized.
Merged as such: http://git.xfce.org/apps/mousepad/commit/?id=8d554f7ad97f2b1a2f64a71ebb187fe6eae17281
Do you mind testing this commit? http://git.xfce.org/apps/mousepad/commit/?id=ee7636b8c832f2a8e19c6b3c9d0405f07147b16b My locale encoding is UTF-8 so I'm not sure it's a good test. It just improves the code/speed of previous commit.
It worked in the same way! - 'git clone' in a new directory - sh autogen.sh - cd mousepad/mousepad - ./mousepad /home/p0ng/trálálá/lá.txt And... (mousepad:14926): GLib-GObject-WARNING **: The property GtkSettings:gtk-menu-images is deprecated and shouldn't be used anymore. It will be removed in a future version. (mousepad:14926): Gtk-CRITICAL **: gtk_recent_manager_lookup_item: assertion 'GTK_IS_RECENT_MANAGER (manager)' failed (mousepad:14926): GLib-GObject-WARNING **: The property GtkButton:use-stock is deprecated and shouldn't be used anymore. It will be removed in a future version. (mousepad:14926): GLib-GObject-WARNING **: The property GtkSettings:gtk-button-images is deprecated and shouldn't be used anymore. It will be removed in a future version. Only warning messages. Thanks for the quick help! :)