[vox-tech] Removing Files [SOLVED]

Mark K. Kim vox-tech@lists.lugod.org
Thu, 27 May 2004 02:04:13 -0700 (PDT)


Cool!  I think what happened is that the JFS module couldn't map one of
the characters to the current locale's charset, so it ended up mapping the
unprintable character to the character designated for "an unprintable
character."  And when you try to delete the file with "the unprintable
character", it couldn't find that file on the FS because the filename
mapping of unprintable characters is one-direction only (it's a hash, and
several unprintable characters map to a single "unprintable character
character").  So the system couldn't find the file, couldn't find the
inode, so statting, no deleting, etc.  But the FS is perfectly fine
according to the JFS specs, so fsck wasn't giving any error messages.

I've seen this happen with Korean data CDs (iso9660 FS) on US Linux boxes,
and I think also Korean filenames on FAT.  I think ext2 module is smart
enough to know how to handle unprintable characters, at least natively
under Linux, but other FS modules aren't, probably because the encodings
used on those FS don't map nicely to Linux.  So some of them have charset
options to make the translation work.

It's weird that Daniel's kernel didn't have UTF-8 support!  I figured it'd
be supported by default so that's why I thought the problem is the lack of
locales available on the system.  I had noticed that the setlocale() call,
which is used for setting locales for any given process, fails if the
locale hasn't been generated on the system (no matter what the GNU
documentation says!) so I figured that was the problem...

Anyways...!!!  Glad you figured out it was the kernel.  I wouldn't have
figured!

-Mark

PS: If I sound like a detective explaining what happened after solving a
crime, it's because i'm watching a detective anime right now... -_-'


On Wed, 26 May 2004, Daniel Hurt wrote:

> Finally after long last the problem is solved.  Only took a new kernel
> ;-p  I am not sure what gave me the idea, but something that I was
> reading triggered the memory that there are different kernel options for
> adding character sets.
>
> For the 2.6 Kernel Branch I had to go into
>
> File Systems
>    \---> Native Language Support
>       \---> NLS UTF8 Support
>
> And enable.  The once that was completed, I could now mount the drive
> with UTF8 support as suggested by Mark Kim.
>
> # mount /dev/vg/media /usr/media/ -o iocharset=3Dutf8
>
> Not sure if I had to create the local first, because I did it before I
> modified the kernel. But on Gentoo these are the commands that I had to
> use to do that:
>
> # localedef -i en_US -c -f UTF-8 en_US.UTF-8
> # export LC_CTYPE=3Den_US.UTF-8
>
>
> I was successfully able to rename the files.  Thanks for all the help
> everyone.  Much appreciated.
>
> Dan
>
>
> Daniel Hurt wrote:
> > I have a question regarding deletion of files.  In the conversion of my
> > files from my windows to Linux, I had some files that had special
> > characters in them.  They copied to the Linux file system, but now I
> > cannot access them to modify them.  I was curious about how to go about
> > removing these files:
> >
> > ls: ./Evil Dead 3 - Army of Darkness (Director=B4s Cut).avi: No such fi=
le
> > or directory
> > ls: ./AFI - 03 - Y?rf Rendenmein.mp3: No such file or directory
> > ls: ./NOFX - 09 - Champs Elys?es.mp3: No such file or directory
> >
> > Any suggestions would be most appreciated.
> >
> > Dan
> > _______________________________________________
> > vox-tech mailing list
> > vox-tech@lists.lugod.org
> > http://lists.lugod.org/mailman/listinfo/vox-tech
> >
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
>

--=20
Mark K. Kim
AIM: markus kimius
Homepage: http://www.cbreak.org/
Xanga: http://www.xanga.com/vindaci
Friendster: http://www.friendster.com/user.jsp?id=3D13046
PGP key fingerprint: 7324 BACA 53AD E504 A76E  5167 6822 94F0 F298 5DCE
PGP key available on the homepage