LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-21-2008, 05:18 AM   #16
sertmusluman
Member
 
Registered: Jan 2006
Location: Canakkale, Turkiye
Distribution: Slackware 12.2
Posts: 53

Original Poster
Rep: Reputation: 15

Quote:
Originally Posted by Ilgar View Post
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.
Yes names of pre-existing files created on windows are still shown in destroyed form. I can rename them with the names consisting special characters. I can create and rename files and folders with charater i use, but i can not convert names of all problematic files into the right form. The only solution for me now is that renaming each file by hand.

Now i am going to copy one of these files, let us look what you see please.
 
Old 12-21-2008, 05:29 AM   #17
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,644

Rep: Reputation: 145Reputation: 145
You could try convmv like I suggested above. I tested it only on linux partitions, but it should also work on windows partitions. You see any changes beforehand and can check if the script converts the characters right, so in the first run (with missing "--notest") convmv won't write anything but just do a dry run.
 
Old 12-21-2008, 05:32 AM   #18
sertmusluman
Member
 
Registered: Jan 2006
Location: Canakkale, Turkiye
Distribution: Slackware 12.2
Posts: 53

Original Poster
Rep: Reputation: 15
Sample problematic file:
http://www.metu.edu.tr/~e156094/abc.tar.gz
 
Old 12-21-2008, 05:38 AM   #19
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,644

Rep: Reputation: 145Reputation: 145
I get Nilüfer - 08 - Ansìzìn.mp3, first word with u with dieresis (double points) in the middle, second word with two accents grave on i. I am using utf8 as my locale though (de_DE.utf8).
 
Old 12-21-2008, 05:42 AM   #20
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
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.
I could not install convmv tool and looked for a native slackware package of it bu i could not find.

Can i apply this process only one file to try?
Here "convmv -f iso8859-9 -t utf8 -r" command is for what? For whole content of current directory?
 
Old 12-21-2008, 05:49 AM   #21
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,644

Rep: Reputation: 145Reputation: 145
No need to "install" it, it's just a perl script. Get the tarball, unpack it and mv the file whereever you want (if you want it in /usr/bin so copy it there or whereever.

And yes. you go (cd ..) where you want to try it (copy some files in a testfolder first), then convmv will work from there and down into subfolders - folders that are above in the folder structure won't get touched.

EDIT: make only sure it's executable (chmod +x convmv) or call it with "perl convmv", both ways are ok, the first one is more handy.

Last edited by titopoquito; 12-21-2008 at 05:50 AM.
 
Old 12-21-2008, 05:52 AM   #22
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
I get Nilüfer - 08 - Ansìzìn.mp3, first word with u with dieresis (double points) in the middle, second word with two accents grave on i. I am using utf8 as my locale though (de_DE.utf8).
I can not get the output that you got.Did your Slack converted it into this form during extraction? If mine does this, this will be sufficent for me because now it is meaningful for me, but still wrong, "Ansizin" must be "Ansızın". In this word letter "ì" must be without head like "ı".

EDIT: Now I saw your last post. I am going to try.

Last edited by sertmusluman; 12-21-2008 at 05:57 AM.
 
Old 12-21-2008, 05:58 AM   #23
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,644

Rep: Reputation: 145Reputation: 145
I guess it is saved in utf8, my system does that transparently, that means I just extract the file and it reads like that. The "i" is with accent grave (the accent from upper left to lower right), so definitely not the accent you want on your system.
 
Old 12-21-2008, 06:12 AM   #24
sertmusluman
Member
 
Registered: Jan 2006
Location: Canakkale, Turkiye
Distribution: Slackware 12.2
Posts: 53

Original Poster
Rep: Reputation: 15
Code:
sinem@sinemg:~$ su
Password:
root@sinemg:/home/sinem# cd /home/sinem/Desktop/convmv-1.01
root@sinemg:/home/sinem/Desktop/convmv-1.01# chmod -R a+x *
root@sinemg:/home/sinem/Desktop/convmv-1.01# convmv -f iso8859-9 -t utf8 -r
bash: convmv: command not found
root@sinemg:/home/sinem/Desktop/convmv-1.01# /home/sinem/Desktop/convmv-1.01                                -f iso8859-9 -t utf8 -r
bash: /home/sinem/Desktop/convmv-1.01: is a directory
root@sinemg:/home/sinem/Desktop/convmv-1.01# /home/sinem/Desktop/convmv-1.01/convmv -f iso8859-9 -t utf8 -r
Unknown option: r
convmv 1.01 - converts filenames from one encoding to another
Copyright (C) 2003 Bjoern Jacke <bjoern@j3e.de>

This program comes with ABSOLUTELY NO WARRANTY; it may be copied or modified
under the terms of the GNU General Public License version 2 as published by
the Free Software Foundation.

 USAGE: convmv [options] FILE(S)
-f enc    encoding *from* which should to converted
-t enc    encoding *to* which should to converted
-i        interactive mode (ask for each action)
--nfc     target files will be normalization form C for UTF-8 (Linux etc.)
--nfd     target files will be normalization form D for UTF-8 (OS X etc.)
--qfrom   be quiet about the "from" of a rename (if it screws up your terminal e.g.)
--qto     be quiet about the "to" of a rename (if it screws up your terminal e.g.)
--list    list all available encoding
--nosmart ignore if files already seem to be UTF-8 and convert is posible
--notest  just print out to stdout what will be done
--replace will replace files if they are equal
--help    print this help
root@sinemg:/home/sinem/Desktop/convmv-1.01# clear
root@sinemg:/home/sinem/Desktop/convmv-1.01# ls
Changes  GPL2  MD5sums  Makefile  Nilüfer - 08 - Ansìzìn.mp3  VERSION  convmv
root@sinemg:/home/sinem/Desktop/convmv-1.01# chmod -R a+x *
root@sinemg:/home/sinem/Desktop/convmv-1.01# /home/sinem/Desktop/convmv-1.01/convmv -f iso8859-9 -t utf8 -r
Unknown option: r
convmv 1.01 - converts filenames from one encoding to another
Copyright (C) 2003 Bjoern Jacke <bjoern@j3e.de>

This program comes with ABSOLUTELY NO WARRANTY; it may be copied or modified
under the terms of the GNU General Public License version 2 as published by
the Free Software Foundation.

 USAGE: convmv [options] FILE(S)
-f enc    encoding *from* which should to converted
-t enc    encoding *to* which should to converted
-i        interactive mode (ask for each action)
--nfc     target files will be normalization form C for UTF-8 (Linux etc.)
--nfd     target files will be normalization form D for UTF-8 (OS X etc.)
--qfrom   be quiet about the "from" of a rename (if it screws up your terminal e.g.)
--qto     be quiet about the "to" of a rename (if it screws up your terminal e.g.)
--list    list all available encoding
--nosmart ignore if files already seem to be UTF-8 and convert is posible
--notest  just print out to stdout what will be done
--replace will replace files if they are equal
--help    print this help
root@sinemg:/home/sinem/Desktop/convmv-1.01#
I got the above message.

Last edited by sertmusluman; 12-25-2008 at 04:17 AM.
 
Old 12-21-2008, 06:15 AM   #25
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,644

Rep: Reputation: 145Reputation: 145
You call it as root. Root user has the current directory not in path, so you must precede the command with "./". This would work though if you do it as normal user.

Code:
./convmv -f iso8859-9 -t utf8 -r *
 
Old 12-21-2008, 06:22 AM   #26
sertmusluman
Member
 
Registered: Jan 2006
Location: Canakkale, Turkiye
Distribution: Slackware 12.2
Posts: 53

Original Poster
Rep: Reputation: 15
Code:
root@sinemg:/home/sinem/Desktop/convmv-1.01# exit
exit
sinem@sinemg:~$ cd /home/sinem/Desktop/convmv-1.01
sinem@sinemg:~/Desktop/convmv-1.01$ ./convmv -f iso8859-9 -t utf8 -r *
Unknown option: r
Skipping, already UTF-8: .//Nilüfer - 08 - Ansìzìn.mp3
No changes to your files done. Use --notest to finally rename the files.
sinem@sinemg:~/Desktop/convmv-1.01$
 
Old 12-21-2008, 06:26 AM   #27
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,644

Rep: Reputation: 145Reputation: 145
First, I'm not sure if you have to use it the other way round (-f utf8 -t iso8859-9) since you use tr_TR locale and not tr_TR.utf8.

Second: You use a very old version of convmv. Get the latest version and it will understand the -r option. Furthermore you may break your special characters, newer versions work around some bugs in perl that else could lead to some funny characters. Version 1.14 is the current package.

Last edited by titopoquito; 12-21-2008 at 06:27 AM.
 
Old 12-21-2008, 06:26 AM   #28
sertmusluman
Member
 
Registered: Jan 2006
Location: Canakkale, Turkiye
Distribution: Slackware 12.2
Posts: 53

Original Poster
Rep: Reputation: 15
In here you can see the name of file from my view.

http://img522.imageshack.us/img522/4725/dddit8.jpg
 
Old 12-21-2008, 06:28 AM   #29
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,157

Rep: Reputation: 237Reputation: 237Reputation: 237
So it's already utf8 (and it says unknown option -r, as you can see, it's not in the list of options. Please make the basic research and checks before you post).
 
Old 12-21-2008, 06:28 AM   #30
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,644

Rep: Reputation: 145Reputation: 145
Yes, get the newer version and try it from to utf8 to iso8859-9, I hope that will look much better
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:08 PM.

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