Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Nautilus: Use locale instead UTF-8 for filenames
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
gonzzor
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2004
Posts: 133

PostPosted: Wed Jun 07, 2006 10:12 am    Post subject: Nautilus: Use locale instead UTF-8 for filenames Reply with quote

Problem
I use ISO-8859-1 for my filenames and for some reason Nautilus started to use UTF-8. This made all my current files display certain chars wrong and all new files with special chars displayed wrong in other apps. This problem started after upgrading to Gnome 2.14.

Solution
Just change the file
Code:
/etc/env.d/50glib2

There you will find a line looking like this
Code:
G_FILENAME_ENCODING=UTF-8

Change it to
Code:
G_FILENAME_ENCODING="@locale"

Then Nautilus will use your current locale settings instead of UTF-8.

Afaik, you can set it to whatever encoding you want there, but this I'm not sure of so try if you need it.

Remeber
Update global enviorment
Code:
sudo env-update

You need to logout and login for changes to take effect.
_________________
After 5 hours trying to install PHP 4 on FreeBSD I missed my Gentoo machine...
Back to top
View user's profile Send private message
EricHsu
Moderator
Moderator


Joined: 03 May 2004
Posts: 591
Location: Aragon Consulting Group, Beijing, China

PostPosted: Tue Jun 13, 2006 12:04 pm    Post subject: Reply with quote

cOo!

That's what I've been looking for, big thanks to gonzzor!
_________________
- http://nkbit.com
- http://twitter.com/xuyihua
Back to top
View user's profile Send private message
RiBBiT
Apprentice
Apprentice


Joined: 18 May 2005
Posts: 215
Location: Sweden

PostPosted: Thu Jul 13, 2006 10:43 pm    Post subject: Reply with quote

Perfect! Thanks gonzzor!
_________________
Comix - GTK Comic Book Viewer [ http://comix.sourceforge.net ]
Back to top
View user's profile Send private message
cheng91
n00b
n00b


Joined: 10 Apr 2005
Posts: 17

PostPosted: Fri Jul 14, 2006 9:27 am    Post subject: Reply with quote

Thanks, it's cool.
It works for local files.
But I still cannot use Nautilus to browse ftp site. I got "invalid utf-8" in filename.
Have any idea?
_________________
Who is more busy than he who hath least to do?
Back to top
View user's profile Send private message
linuxreaktor
n00b
n00b


Joined: 03 Jan 2004
Posts: 41
Location: Frankfurt / Germany

PostPosted: Sat Jul 15, 2006 6:05 pm    Post subject: Reply with quote

THAAANKS, spent the whole shiny 8) saturday inside to find a solution :( ....

Great, solved, welcome to gnome 2.14... :P :lol:

greetings david
Back to top
View user's profile Send private message
bekkra
n00b
n00b


Joined: 13 Sep 2004
Posts: 57

PostPosted: Tue Jul 18, 2006 10:48 pm    Post subject: Reply with quote

Geeeez, how simple ! Well done and thanks for the help.

HOWEVER:

I mean that this is a bug in the distribution, but I'd rather see some discussion about this before filing a bug report. My reasoning is simply:

IF a user sets a locale, then the user simply wants to use it, thus the default setting for glib2 should be to use the set locale,

because

IF a user wants different settings for various parts of the system, we have made this possible.

Any thoughts around this ?

//
_________________
Bugs don't "go away" ( Steve McGuire )
Back to top
View user's profile Send private message
crudh
l33t
l33t


Joined: 12 May 2005
Posts: 696
Location: Sundbyberg, Sweden

PostPosted: Fri Jul 21, 2006 2:38 am    Post subject: Reply with quote

Thanks, helped me too.
Back to top
View user's profile Send private message
psycepa
Veteran
Veteran


Joined: 27 Dec 2004
Posts: 1637
Location: Poland

PostPosted: Wed Aug 23, 2006 7:13 am    Post subject: Reply with quote

and one more thing
AFAIR
IF you do
Code:

env-update && source /etc/profile

you won't have to relogin
:) just a hint :)
greetz
_________________
RLUNo. 376073
bo czytac, to trzeba ze zrozumieniem (c) by psycepa
"nigdy nie kloc sie z glupcem, najpierw sprowadzi cie do swojego poziomu a potem pokona doswiadczeniem"
"Life is complex. It has its real and imaginary part."
Back to top
View user's profile Send private message
mrsteven
Veteran
Veteran


Joined: 04 Jul 2003
Posts: 1892

PostPosted: Wed Aug 23, 2006 11:15 am    Post subject: Reply with quote

Note that this does not only help with nautilus but also with all GTK+ file dialogs.

bekkra wrote:
Geeeez, how simple ! Well done and thanks for the help.
HOWEVER:
I mean that this is a bug in the distribution, but I'd rather see some discussion about this before filing a bug report. My reasoning is simply:
IF a user sets a locale, then the user simply wants to use it, thus the default setting for glib2 should be to use the set locale,
because
IF a user wants different settings for various parts of the system, we have made this possible.
Any thoughts around this ?

Well, that is what ~/.bash_profile is for:
Code:
export G_BROKEN_FILENAMES=1
export G_FILENAME_ENCODING=ISO-8859-15
unset LC_ALL
export LANG=en_US

_________________
Unix philosophy: "Do one thing and do it well."
systemd: "Do everything and do it wrong."
Back to top
View user's profile Send private message
rafaelkafka
n00b
n00b


Joined: 03 Feb 2005
Posts: 28

PostPosted: Wed Sep 06, 2006 8:03 pm    Post subject: Re: Nautilus: Use locale instead UTF-8 for filenames Reply with quote

You need to logout and login for changes to take effect.[/quote]

God bless you, UTF-8 in portuguese is a crap.They don't know the existence of signals (~, ^,`, ') and mess all.

UTF-8 is useless for 99 por cent of users.

Many Thanks,

Rafael Kafka
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum