After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 324406 - "Open Location" autocompletion truncates filenames
"Open Location" autocompletion truncates filenames
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
0.x.x [obsolete]
Other All
: Normal major
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-12-18 18:41 UTC by Jan Boehm
Modified: 2006-01-11 15:23 UTC
See Also:
GNOME target: 2.14.x
GNOME version: 2.13/2.14


Attachments
fix. (1.25 KB, patch)
2006-01-07 21:55 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Jan Boehm 2005-12-18 18:41:53 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:
Comment 1 Christian Kirbach 2005-12-18 21:20:53 UTC
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
Comment 2 Allison Karlitskaya (desrt) 2006-01-07 21:55:47 UTC
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.
Comment 3 Christian Kirbach 2006-01-08 01:01:24 UTC
patch works for me.
Comment 4 Martin Wehner 2006-01-10 20:24:44 UTC
Comment on attachment 56937 [details] [review]
fix.

Looks fine, please commit.
Comment 5 Allison Karlitskaya (desrt) 2006-01-11 15:23:02 UTC
done + done, thx.