[vox-tech] Removing Files [SOLVED]

Daniel Hurt vox-tech@lists.lugod.org
Thu, 27 May 2004 02:16:05 -0700


Mark K. Kim wrote:
> 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.
> 

Actually I noticed looking through dmesg that JFS was trying to load 
alternate character sets when it noticed that it could not read the file 
as this snippet from dmesg shows:

hdg: max request size: 64KiB
hdg: 390721968 sectors (200049 MB) w/8192KiB Cache, CHS=24321/255/63,
UDMA(100)
....
non-latin1 character 0xfffc found in JFS file name
mount with iocharset=utf8 to access
non-latin1 character 0xfffc found in JFS file name
mount with iocharset=utf8 to access
non-latin1 character 0xffe9 found in JFS file name
mount with iocharset=utf8 to access
non-latin1 character 0xfffc found in JFS file name
mount with iocharset=utf8 to access
non-latin1 character 0xfffc found in JFS file name
mount with iocharset=utf8 to access

So I think the big culprit was not having the character set enabled in 
the kernel.

Dan

> 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=utf8
>>
>>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=en_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´s Cut).avi: No such file
>>>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
>>
> 
>