[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I've discovered a way to show arabic windows file names in gtk2 applications



Hi all,
Sorry for the long subject,
I was studying the glib2 source, and i discovered how to read the Arabic
names "however there is problems with files containing numbers- at least
with me - "

Here is what i did exactly:
$ export CHARSET=ISO_8859-6
$ export G_BROKEN_FILENAMES=0
then
# umount /mnt/win_f "cause it was already mounted"
# mount -t auto /dev/hda7 /mnt/win_f/ -oiocharset=iso8859-6
after that everything should be fine,
"I've attached a screen shot showing nautilus 2 "though i don't use
gnome but i didn't find an application except that ;)"
Sorry the screen shot is large in size but it's 5:44 now and i'm so tired to modify it via The GIMP!!!

Also the title bar "using sawfish2" doesn't display correctly, but i think
that's a font issue and i don't feel like learning LISP to modify
sawfish configuration files 
========
If you don't have enough experience with Linux and/or programming, Don't
read the following ;)
========
Here is my explanation:
the file browser calls g_filename_to_utf8() which calls the function
have_broken_filenames()
if have_broken_filenames() returns true, g_locale_to_utf8() is called

have_broken_filenames() checks if the variable G_BROKEN_FILENAMES is
defined, if so it returns TRUE otherwise FALSE is returned.
now since we did define G_BROKEN_FILENAMES, have_broken_filenames()
returns TRUE, so g_locale_to_utf8() gets called

g_locale_to_utf8() checks for the variable CHARSET and concerts the
filenames to utf8 from it using g_convert()
and since we passed mount "-ocharset=iso8859-6", and CHARSET = ISO-8859_6
everything works fine
-- 
----------------
-- Katoob Main Developer
Linux registered user # 224950
ICQ # 58475622
With Great Power, Comes Great Responsibilities.

Attachment: Screenshot-Nautilus.png
Description: PNG image

Attachment: pgp00008.pgp
Description: PGP signature