Re: locale encoding filename in Nautilus
- From: Alexander Larsson <alexl redhat com>
- To: xLoneStar <lone auvtech com>
- Cc: Nautilus <nautilus-list gnome org>
- Subject: Re: locale encoding filename in Nautilus
- Date: 27 Oct 2003 12:21:11 +0100
On Mon, 2003-10-27 at 10:36, xLoneStar wrote:
> When nautilus accesses smb:// URI, it will dispaly all the locale
> encoding filename as "Invalid Unicode", nautilus has never tried to
> convert them to utf8. The same to ftp:// . Nautilus can display locale
> encoding filename in local filesystem correctly, however, when you
> export your directory as Samba Share, your network neighbor cannot
> display them at all! This is strange and troubles users a lot.
>
> About line 2396 in the function nautilus_file_get_display_name_nocopy()
> of the file libnautilus-private/nautilus-file.c, I found the following
> code:
>
> if (has_local_path (file)) {
> ...
> if (broken_filenames || !g_utf8_validate (name, -1, NULL)) {
> utf8_name = g_locale_to_utf8 (name, -1, NULL, NULL, NULL);
> ...
>
> Im wondering why the convert just performes on files in the local
> filesystem. I want to move it before 'if' so that it will be efficient
> on all of the URI.
>
> Besides that, the file operations progress box needs a similar
> modify, too. My patch is attached.
This isn't right. G_BROKEN_FILENAMES only applies to local filesystem
filenames and there is no way you can know this works on any random
remote system. You don't know what locale the remote system uses, or
exactly what form URIs take for non-file: protocols.
For smb:// this is really a bug in the smb method. It should ask the smb
server about the encoding used and do the conversion.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a scarfaced soccer-playing card sharp who dotes on his loving old ma.
She's a sarcastic streetsmart politician looking for love in all the wrong
places. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]