[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Hebrew filenames on vfat
Hi
Some time ago someone on this list asked how to see filenames with Hebrew
letters on vfat filesystem. So here is a solution that I've found: First of
all mount your vfat fs with "uni_xlate" option. Then put the following into
your .bash_profile ( needless to say you should use it on xterm (or friends)
with Hebrew font ).
#=======================================
function lsh {
ls --color=yes "$@" | perl -e '
%hmap=(
D05 => chr(224),
D45 => chr(225),
D85 => chr(226),
DC5 => chr(227),
DG5 => chr(228),
DK5 => chr(229),
DO5 => chr(230),
DS5 => chr(231),
DW5 => chr(232),
Da5 => chr(233),
De5 => chr(234),
Di5 => chr(235),
Dm5 => chr(236),
Dq5 => chr(237),
Du5 => chr(238),
Dy5 => chr(239),
E05 => chr(240),
E45 => chr(241),
E85 => chr(242),
EC5 => chr(243),
EG5 => chr(244),
EK5 => chr(245),
EO5 => chr(246),
ES5 => chr(247),
EW5 => chr(248),
Ea5 => chr(249),
Ee5 => chr(250)
);
while(<>){
while( /(:\w{3})+/g ) {
$encoded_word = $word = $&;
$word =~ s/:(\w{3})/$hmap{$1}/g;
$hword = reverse($word) ;
s/$encoded_word/$hword/ ;
}
print ;
}' }
#========================================================
I've also attached to this message a little patch that I wrote to zip-2.1 ,
that will enable you to backup vfat filesystem and later extract the resulting
zip files under Windoze with correct Hebrew in filenames. You should use "-H"
option for zip.
Bye.
Boris.
----------------------------------
E-Mail: Boris Singerman <boris@ndc.soreq.gov.il>
Date: 06-Dec-97
Time: 10:52:29
This message was sent by XFMail
----------------------------------
hebrew-patch.diff.gz