iso-8859-2 encoding problem on filesystem

Chris F.A. Johnson cfaj-uVmiyxGBW52XDw4h08c5KA at public.gmane.org
Sun Sep 10 21:28:05 UTC 2006


On Sun, 10 Sep 2006, Zbigniew Koziol wrote:

>
> I have got some songs in Polish from the Internet, recorded them on CD.
>
> I am able to play them by drugging by mouse to RealPlayer.
>
> But I can not open them in another way or copy them under a different file
> name to hard drive. They contain some Polish signs in iso-8859-2 (I guess)
> which are displayed in terminal window as ?'s . Midnight Commander used to
> deal perfectly well with similar problems but not this time. It looks like
> the system does not recognize the file names.
>
> How to make a copy of them under a different filename?

    Use wildcards in a shell, e.g.:

for file in *.mp3
do
   newname=${file//[^a-zA-Z0-9.-_]/}
   mv "$file" "$newname"
done

-- 
    Chris F.A. Johnson                      <http://cfaj.freeshell.org>
    ===================================================================
    Author:
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wini/Mailing_lists





More information about the Legacy mailing list