GNOME Bugzilla – Bug 324406
"Open Location" autocompletion truncates filenames
Last modified: 2006-01-11 15:23:02 UTC
Please describe the problem: When using the open location dialog to open a file, whose name is containing non ascii characters (in my case UTF8 longer than one byte), the auto completion 'miscounts' the string length and cuts characters at the end of the filename. It looks as if there is a character count applied as byte count. Notice that this does not happen for directory names. Steps to reproduce: 1. Create a file containing non ascii unicode characters (try 'ü' if your german ;) 2. Open the 'open location' dialog with ctrl+l 3. Type the beginning of the filename Actual results: Only part of the name is shown. In my case ('ü' ü) one character per offending character is cut off the end of the name. Expected results: The full name should be shown. Does this happen every time? Other information:
Thank you for reporting. I can confirm this behaviour with the latest development build. It seems to fail with any special character, i.e. öä and ñ my locale is es_UTF8
Created attachment 56937 [details] [review] fix. 2006-01-07 Ryan Lortie <desrt@desrt.ca> * src/nautilus-location-entry.c (try_to_expand_path): Use strlen() instead of g_utf8_strlen() since gtk_editable_insert_text takes the number of bytes (not number of characters). Fixes #324406.
patch works for me.
Comment on attachment 56937 [details] [review] fix. Looks fine, please commit.
done + done, thx.