LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-20-2008, 06:02 PM   #1
sertmusluman
Member
 
Registered: Jan 2006
Location: Canakkale, Turkiye
Distribution: Slackware 12.2
Posts: 53

Rep: Reputation: 15
File and folder names containing "Ğ ğ – Ü ü – İ – ı – Ö ö – Ş ş" ?


I can not create or rename files and folders with names containing "Ğ ğ – Ü ü – İ – ı – Ö ö – Ş ş -Ç ç"*

Names of previously created files and folders with these characters are shown in a meaningless and destroyed form.

How can i solve this problem?

*These are Turkish characters differ from Latin alphabet.

Last edited by sertmusluman; 12-20-2008 at 06:06 PM.
 
Old 12-20-2008, 06:25 PM   #2
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,646

Rep: Reputation: 147Reputation: 147
Hi sertmusluman, you have saved the files with an other locale than your current one. What does "locale" output as your current setting?

You can then use convmv http://www.j3e.de/linux/convmv/ to convert files to your current locale, but test it on a copy before you might break something.

Example (just call convmv without any option to see the help) to convert from iso8859-9 to utf8 encoding:

Code:
convmv -f iso8859-9 -t utf8 -r
If the testrun is ok, you call it with added "--notest" to actually apply the changes.
 
Old 12-20-2008, 06:51 PM   #3
sertmusluman
Member
 
Registered: Jan 2006
Location: Canakkale, Turkiye
Distribution: Slackware 12.2
Posts: 53

Original Poster
Rep: Reputation: 15
How can i view and edit my locale settings? I have installed Slack with the full installation option consisting international language support of KDE. I do not have an extra slackware os for performing slack experiments, but i worths to try your instructions. I want also to create files in an encoding comprises related letters above, will it be possible after this process?

These are the files from my windows days. I saved them on an external hard drive. If i connect this drive to a windows machine, file names are seen in the right form.
 
Old 12-20-2008, 07:06 PM   #4
sertmusluman
Member
 
Registered: Jan 2006
Location: Canakkale, Turkiye
Distribution: Slackware 12.2
Posts: 53

Original Poster
Rep: Reputation: 15
Requesting "locale -a" command produced below scene.

Quote:
root@sinemg:/home/sinem# locale -a
C
POSIX
aa_DJ
aa_DJ.utf8
aa_ER
aa_ER@saaho
aa_ET
af_ZA
af_ZA.utf8
am_ET
an_ES
an_ES.utf8
ar_AE
ar_AE.utf8
ar_BH
ar_BH.utf8
ar_DZ
ar_DZ.utf8
ar_EG
ar_EG.utf8
ar_IN
ar_IQ
ar_IQ.utf8
ar_JO
ar_JO.utf8
ar_KW
ar_KW.utf8
ar_LB
ar_LB.utf8
ar_LY
ar_LY.utf8
ar_MA
ar_MA.utf8
ar_OM
ar_OM.utf8
ar_QA
ar_QA.utf8
ar_SA
ar_SA.utf8
ar_SD
ar_SD.utf8
ar_SY
ar_SY.utf8
ar_TN
ar_TN.utf8
ar_YE
ar_YE.utf8
as_IN.utf8
ast_ES
ast_ES.utf8
az_AZ.utf8
be_BY
be_BY.utf8
be_BY@latin
ber_DZ
ber_MA
bg_BG
bg_BG.utf8
bn_BD
bn_IN
br_FR
br_FR.utf8
br_FR@euro
bs_BA
bs_BA.utf8
byn_ER
ca_AD
ca_AD.utf8
ca_ES
ca_ES.utf8
ca_ES@euro
ca_FR
ca_FR.utf8
ca_IT
ca_IT.utf8
crh_UA
cs_CZ
cs_CZ.utf8
csb_PL
cy_GB
cy_GB.utf8
da_DK
da_DK.utf8
de_AT
de_AT.utf8
de_AT@euro
de_BE
de_BE.utf8
de_BE@euro
de_CH
de_CH.utf8
de_DE
de_DE.utf8
de_DE@euro
de_LU
de_LU.utf8
de_LU@euro
dz_BT
el_CY
el_CY.utf8
el_GR
el_GR.utf8
en_AU
en_AU.utf8
en_BW
en_BW.utf8
en_CA
en_CA.utf8
en_DK
en_DK.utf8
en_GB
en_GB.utf8
en_HK
en_HK.utf8
en_IE
en_IE.utf8
en_IE@euro
en_IN
en_NG
en_NZ
en_NZ.utf8
en_PH
en_PH.utf8
en_SG
en_SG.utf8
en_US
en_US.utf8
en_ZA
en_ZA.utf8
en_ZW
en_ZW.utf8
es_AR
es_AR.utf8
es_BO
es_BO.utf8
es_CL
es_CL.utf8
es_CO
es_CO.utf8
es_CR
es_CR.utf8
es_DO
es_DO.utf8
es_EC
es_EC.utf8
es_ES
es_ES.utf8
es_ES@euro
es_GT
es_GT.utf8
es_HN
es_HN.utf8
es_MX
es_MX.utf8
es_NI
es_NI.utf8
es_PA
es_PA.utf8
es_PE
es_PE.utf8
es_PR
es_PR.utf8
es_PY
es_PY.utf8
es_SV
es_SV.utf8
es_US
es_US.utf8
es_UY
es_UY.utf8
es_VE
es_VE.utf8
et_EE
et_EE.iso885915
et_EE.utf8
eu_ES
eu_ES.utf8
eu_ES@euro
fa_IR
fi_FI
fi_FI.utf8
fi_FI@euro
fil_PH
fo_FO
fo_FO.utf8
fr_BE
fr_BE.utf8
fr_BE@euro
fr_CA
fr_CA.utf8
fr_CH
fr_CH.utf8
fr_FR
fr_FR.utf8
fr_FR@euro
fr_LU
fr_LU.utf8
fr_LU@euro
fur_IT
fy_DE
fy_NL
ga_IE
ga_IE.utf8
ga_IE@euro
gd_GB
gd_GB.utf8
gez_ER
gez_ER@abegede
gez_ET
gez_ET@abegede
gl_ES
gl_ES.utf8
gl_ES@euro
gu_IN
gv_GB
gv_GB.utf8
ha_NG
he_IL
he_IL.utf8
hi_IN
hr_HR
hr_HR.utf8
hsb_DE
hsb_DE.utf8
hu_HU
hu_HU.utf8
hy_AM
hy_AM.armscii8
id_ID
id_ID.utf8
ig_NG
ik_CA
is_IS
is_IS.utf8
it_CH
it_CH.utf8
it_IT
it_IT.utf8
it_IT@euro
iu_CA
iw_IL
iw_IL.utf8
ja_JP.eucjp
ja_JP.utf8
ka_GE
ka_GE.utf8
kk_KZ
kk_KZ.utf8
kl_GL
kl_GL.utf8
km_KH
kn_IN
ko_KR.euckr
ko_KR.utf8
ku_TR
ku_TR.utf8
kw_GB
kw_GB.utf8
ky_KG
lg_UG
lg_UG.utf8
li_BE
li_NL
l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
zh_SG.utf8
zh_TW
zh_TW.euctw
zh_TW.utf8
zu_ZA
zu_ZA.utf8
root@sinemg:/home/sinem#
 
Old 12-20-2008, 07:07 PM   #5
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,646

Rep: Reputation: 147Reputation: 147
Ah, that might be even easier. Try to add "utf8" as mount option. For example you can try it from command line like this:

Code:
# for FAT32:
mount -t vfat -o utf8 /dev/sdb1 /mnt/tmp
# or for NTFS refer to MrGoblin's post
Adjust the device name and the mount point as you like. This helps me to use German special characters that were written from Windows and write special characters on it that can be read from Windows.

EDIT: forgot ntfs option. MrGoblin beat me while correcting

Last edited by titopoquito; 12-20-2008 at 07:09 PM.
 
Old 12-20-2008, 07:07 PM   #6
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 231Reputation: 231Reputation: 231
You can manually mount the drive with ntfs-3g and specify a locale which should let you see the names correctly.

Perhaps Something like this

ntfs-3g /dev/sda1 /mnt/hd -o locale="tr_TR.utf8"

Last edited by mRgOBLIN; 12-20-2008 at 07:09 PM.
 
Old 12-20-2008, 07:13 PM   #7
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,269
Blog Entries: 24

Rep: Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196
Or if you want to change the locale on the machine...

There are several threads on this forum that can help if you want to change the locale for the whole machine, or for your X session, for example this one here.

Or if you just want to see the files mRgOBLIN's mount info should help.

Last edited by astrogeek; 12-20-2008 at 07:15 PM.
 
Old 12-20-2008, 07:19 PM   #8
sertmusluman
Member
 
Registered: Jan 2006
Location: Canakkale, Turkiye
Distribution: Slackware 12.2
Posts: 53

Original Poster
Rep: Reputation: 15
Quote:
/dev/sda2 swap swap defaults 0 0
/dev/sda1 / ext3 defaults 1 1
/dev/sda5 /opt ext3 defaults 1 2
/dev/sda6 /home ext3 defaults 1 2
/dev/sda4 /xp ntfs-3g umask=000 1 0
/dev/sda7 /depo ntfs-3g auto,noatime,users,suid,dev,exec,locale=tr_TR.UTF-8 0 0
#/dev/cdrom /mnt/cdrom auto user,exec,ro,noauto 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
On "/dev/sda4" with above options i can not see the files which are named with Turkish characters.On "/dev/sda7" with above options i can see the files and folders but names are in malformatted form. Files are working, problem is only in their names.
 
Old 12-20-2008, 07:25 PM   #9
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,646

Rep: Reputation: 147Reputation: 147
What happens if you use "locale=tr_TR" without the trailing utf8?
 
Old 12-20-2008, 07:56 PM   #10
sertmusluman
Member
 
Registered: Jan 2006
Location: Canakkale, Turkiye
Distribution: Slackware 12.2
Posts: 53

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by titopoquito View Post
What happens if you use "locale=tr_TR" without the trailing utf8?
Problem is still the same. After changing fstab entry as you said, i remounted "/dev/sda7", but
problem is the same.

May be "utf8" and "UTF-8" are different. I also tried "locale=tr_TR.utf8" option. But this also yielded nothing.

Last edited by sertmusluman; 12-20-2008 at 08:03 PM.
 
Old 12-20-2008, 08:04 PM   #11
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,157

Rep: Reputation: 237Reputation: 237Reputation: 237
Here is my fstab from my Pardus installation, since it fully supports Turkish it should give a hint in the right direction. For Turkish characters in the console you probably need to set the language variables in /etc/profile (AFAIK Slack now has UTF-8 console support, so that part shouldn't be a problem).

Code:
#   <fs>             <mountpoint>     <type>    <opts>               <dump/pass>
LABEL=PARDUS_ROOT    /                ext3      defaults,user_xattr,noatime 0 0
LABEL=PARDUS_SWAP    none             swap      defaults,sw          0 0
proc                 /proc            proc      nosuid,noexec        0 0
sysfs                /sys             sysfs     defaults             0 0
debugfs              /sys/kernel/debug debugfs   defaults             0 0
tmpfs                /dev/shm         tmpfs     nodev,nosuid,noexec  0 0
/dev/sda4            /mnt/sda4        ntfs-3g   dmask=007,fmask=117,gid=6,locale=tr_TR.UTF-8 0 0
/dev/sda5            /mnt/sda5        ext3      noatime              0 0
/dev/sda1            /mnt/sda1        ntfs-3g   dmask=007,fmask=117,gid=6,locale=tr_TR.UTF-8 0 0
/dev/sda2            /mnt/sda2        vfat      quiet,shortname=mixed,dmask=007,fmask=117,utf8,gid=6 0 0
 
Old 12-20-2008, 08:51 PM   #12
sertmusluman
Member
 
Registered: Jan 2006
Location: Canakkale, Turkiye
Distribution: Slackware 12.2
Posts: 53

Original Poster
Rep: Reputation: 15
Code:
/dev/sda4            /mnt/sda4        ntfs-3g   dmask=007,fmask=117,gid=6,locale=tr_TR.UTF-8 0 0
I integrated above line in to my fstab with required modifications then again i could not use special Turkish characters (ş,Ö,ğ,ü ...) for naming files and folders.

I also changed "/etc/profile.d/lang.sh" file as i below;

Code:
.
.
.
# en_US is the Slackware default locale:
export LANG=tr_TR
.
.
.
Modifiying "lang.sh" file, naming files and folders with special Turkish characters on ext3 partitions was enabled, but i can not do it on ntfs and fat partitions.
 
Old 12-20-2008, 09:05 PM   #13
sertmusluman
Member
 
Registered: Jan 2006
Location: Canakkale, Turkiye
Distribution: Slackware 12.2
Posts: 53

Original Poster
Rep: Reputation: 15
Now i remodified "/etc/fstab" ntfs entry as

Code:
...
/dev/sda7 /depo ntfs-3g auto,noatime,users,suid,dev,exec,locale=tr_TR 0 0
....
Naming files and folders with special Turkish characters on ntfs and fat partitions was enabled too.

Last edited by sertmusluman; 12-20-2008 at 09:14 PM.
 
Old 12-20-2008, 09:22 PM   #14
sertmusluman
Member
 
Registered: Jan 2006
Location: Canakkale, Turkiye
Distribution: Slackware 12.2
Posts: 53

Original Poster
Rep: Reputation: 15
How can i do this for USB drives? Is that possible to name files and folders with special Turkish characters on USB drives?

Now my problem was solved for both native linux partitions and windows partitions, but still i can not convert the names of previously saved datas into the right form? Do i have to edit all data manually? (Very long time required for this.)
 
Old 12-21-2008, 04:54 AM   #15
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,157

Rep: Reputation: 237Reputation: 237Reputation: 237
USB sticks use FAT filesystem, so it should be possible. As for the other problem you mentioned, I didn't quite understand what it is. Are you saying that you can create new files with special characters but the preexisting files still show wrong? If so, were those files created using utf8 really? There's also the ISO-8859-9 encoding for the Turkish alphabet and I remember using that to mount my Windows vfat partitions some years ago (I think you also needed codepage=857 or something like that). I'm not sure but at least on recent Windows (or on ntfs) utf8 should be the locale.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
renaming file names beginning with "-" prashln Linux - General 5 05-01-2010 01:47 AM
how to get rid of " " spaces in file names in a directory lleb Linux - General 7 08-09-2006 04:08 PM
How to issue "ls" command start with the largest file size in a folder? fjkum Linux - Newbie 5 07-27-2006 03:28 AM
How can ı open ".exe" extended files ? bluesky2_1986 Linux - Newbie 7 07-19-2006 10:47 AM
Cannot "Copy To" .jpg file to wallpaper folder LeanPudLou SUSE / openSUSE 5 11-08-2004 08:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration