Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Linux > Slackware

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-17-2008, 08:29 AM
Steven Woody
 
Posts: n/a
How can I handle files with Chinese name

Hi,

I just reintalled my box, and want to backup many of my old files left
in a partition, some of which are with Chinese names. Since I've not
setup X by far, so these files are displayed in strange form such as
\031\032 ... There is another fat32 partition on my disk which
installed and run a dual-booted XP. So I want to do one of the
following:

1. mv/cp these files to the fat32 partition and handle them in XP;
2. burn them directly on to DVDs using growisofs.

But I found, using any method above, files appears in the fat32
partition or DVD are lost their real names, I means they became
\031\032\021 ... in any OS.

Could anyone please help? Thanks.

-
narke
Reply With Quote
  #2 (permalink)  
Old 07-18-2008, 01:38 AM
Steven Woody
 
Posts: n/a
Re: How can I handle files with Chinese name

On Jul 17, 4:29 pm, Steven Woody <narkewo...@gmail.com> wrote:
> Hi,
>
> I just reintalled my box, and want to backup many of my old files left
> in a partition, some of which are with Chinese names. Since I've not
> setup X by far, so these files are displayed in strange form such as
> \031\032 ... There is another fat32 partition on my disk which
> installed and run a dual-booted XP. So I want to do one of the
> following:
>
> 1. mv/cp these files to the fat32 partition and handle them in XP;
> 2. burn them directly on to DVDs using growisofs.
>
> But I found, using any method above, files appears in the fat32
> partition or DVD are lost their real names, I means they became
> \031\032\021 ... in any OS.
>
> Could anyone please help? Thanks.
>
> -
> narke


anyone here?
Reply With Quote
  #3 (permalink)  
Old 07-18-2008, 02:20 AM
Dan C
 
Posts: n/a
Re: How can I handle files with Chinese name

On Thu, 17 Jul 2008 18:38:05 -0700, Steven Woody wrote:

> anyone here?


No. Did you have a Slackware question?

> X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1;


Ahhh. I guess not.


--
"Ubuntu" -- an African word, meaning "Slackware is too hard for me".
The Usenet Improvement Project: http://improve-usenet.org

Reply With Quote
  #4 (permalink)  
Old 07-18-2008, 03:08 AM
Douglas Mayne
 
Posts: n/a
Re: How can I handle files with Chinese name

On Thu, 17 Jul 2008 01:29:36 -0700, Steven Woody wrote:

> Hi,
>
> I just reintalled my box, and want to backup many of my old files left
> in a partition, some of which are with Chinese names. Since I've not
> setup X by far, so these files are displayed in strange form such as
> \031\032 ... There is another fat32 partition on my disk which
> installed and run a dual-booted XP. So I want to do one of the
> following:
>
> 1. mv/cp these files to the fat32 partition and handle them in XP;
> 2. burn them directly on to DVDs using growisofs.
>
> But I found, using any method above, files appears in the fat32
> partition or DVD are lost their real names, I means they became
> \031\032\021 ... in any OS.
>
> Could anyone please help? Thanks.
>
> -
> narke
>

Caveat: I have no real experience with alternate character sets- either in
Slackware or in Windows.

One way to bypass filesystem limitations is to stick with the OS which is
correctly displaying the filenames. If Slackware is correctly displaying
the filenames, then one way is to build a simple "loopback" container. The
steps for using loopback container is as follows:
(1) Allocate the container. I usually use dd. The following command
allocates a 4G empty container.

# dd if=/dev/zero of=container.lfs bs=1024 count=0 seek=4000000

(2) Setup a loopback

# losetup /dev/loop0 container.lfs

(3) Format the loopback. Use a filesystem which will properly display the
names.

# mke2fs /dev/loop0

(4) Mount the loopback

# mount /dev/loop0 /mnt/lfs

(5) Copy you file set into the container.

no example shown here.

(6) When finished, unmount the container and release the loop device.

# umount /mnt/lfs
# losetup -d /dev/loop0

(7) Write container to a DVD using whatever burning program that you
prefer. I use growisofs. Note: with file sizes this large, specify UDF
structures.

(8) Verify DVD is correctly written, and files are readable when mounted
loopback, etc.

# mount /dev/hdc /mnt/dvd
# mount -o loop /mnt/dvd/container.lfs /mnt/lfs

--
Douglas Mayne
Reply With Quote
  #5 (permalink)  
Old 07-18-2008, 04:54 AM
~kurt
 
Posts: n/a
Re: How can I handle files with Chinese name

Steven Woody <narkewoody@gmail.com> wrote:
>
> 1. mv/cp these files to the fat32 partition and handle them in XP;
> 2. burn them directly on to DVDs using growisofs.
>
> But I found, using any method above, files appears in the fat32
> partition or DVD are lost their real names, I means they became
> \031\032\021 ... in any OS.


The best way to back up, or move files around, is to tar them up. At the
very least, you should be able to back the files up with tar. If, after
un-tar'ing the file on the XP box, the names are still not readable, it may
be the XP system doesn't have the language stuff installed, or that it uses
a different scheme for such languages.

- Kurt
Reply With Quote
  #6 (permalink)  
Old 07-18-2008, 05:04 AM
Steven Woody
 
Posts: n/a
Re: How can I handle files with Chinese name

On Jul 18, 11:08 am, Douglas Mayne <d...@localhost.localnet> wrote:
>
>
> (3) Format the loopback. Use a filesystem which will properly display the
> names.
>
> # mke2fs /dev/loop0


I am not sure, what kind of file system can handle my files. What I
currently used are ext3. I know in Windows, these files name can be
correctly display, but I can not access linux partion in Windows. I'd
ever tried a tool, it claimed it can read ext2/3 and some others, but
the speed is very very slow, I then give up.

So, mk??? /dev/loop0 should I use?

> (7) Write container to a DVD using whatever burning program that you
> prefer. I use growisofs. Note: with file sizes this large, specify UDF
> structures.


Just like burning a normal file? Can you show me a simple growisofs
command line to make me clear? Thank you very much.

Reply With Quote
  #7 (permalink)  
Old 07-18-2008, 01:18 PM
Douglas Mayne
 
Posts: n/a
Re: How can I handle files with Chinese name

On Thu, 17 Jul 2008 22:04:42 -0700, Steven Woody wrote:

> On Jul 18, 11:08 am, Douglas Mayne <d...@localhost.localnet> wrote:
>>
>>
>> (3) Format the loopback. Use a filesystem which will properly display the
>> names.
>>
>> # mke2fs /dev/loop0

>
> I am not sure, what kind of file system can handle my files. What I
> currently used are ext3. I know in Windows, these files name can be
> correctly display, but I can not access linux partion in Windows. I'd
> ever tried a tool, it claimed it can read ext2/3 and some others, but
> the speed is very very slow, I then give up.
>

I googled "ext2 Windows" and came back with some likely candidates. Which
one have you tried?

This is the top google hit, but I haven't tried it myself:
http://www.fs-driver.org/index.html

>
> So, mk??? /dev/loop0 should I use?
>

ext3 is backward compatible with ext2. Since your filesystem is fixed,
there is no need to have a journal; ext2 appears to be fine. mke2fs.
>
>> (7) Write container to a DVD using whatever burning program that you
>> prefer. I use growisofs. Note: with file sizes this large, specify UDF
>> structures.

>
> Just like burning a normal file? Can you show me a simple growisofs
> command line to make me clear? Thank you very much.
>

I usually use a two step prcoess: create the iso, then burn it to a dvd.
This works best with the older computers to avoid buffer underruns, etc.
It is also fastest to read the source material from one disk and write the
output iso to another physical disk, etc.

# mkdir dvd
# mv container.lfs dvd
# mkisofs -R -J -udf -o /tmp/dvd-x.iso dvd
# growisofs -dvd-compat -Z /dev/hdd=/tmp/dvd-x.iso

Note: fixup any device and directory names as appropriate for your system.
>


Note: Comments inline.

It could be this method is overkill for what you are trying to do. First,
if only getting access to your files from Windows, then perhaps a
different ext2 driver for Windows would be much simpler than this. The
loopback container method that I explained could be the right method if
you need a backup method that gives quickest access to your files. I
believe it is very quick; just pop in the disk and mount the loopback
container. (BTW, I am not sure this method would actually work when booted
in Windows. I am curious to find out if any of the ext2 drivers for
Windows will allow the "partition" to be specified as a file. From what I
can tell, it looks like each of the projects look at actual disk
partitions and identify what filesystem is present and allow you to "map a
drive letter." There may be no provision for the case where the
"partition" is encapsulated within a file.)

The method I have shown lacks any compression. If you want, or need
that, then tar (with a compression stage) is probably a better choice.

[ Off-topic ]
I was surprised that the Mac OS X does not support ext2. I googled for
that on a separate problem and came back with nothing. That is surprising
since one would think that ext2 would be fairly universal and present in
almost any *nix-like OS.

--
Douglas Mayne
Reply With Quote
  #8 (permalink)  
Old 07-19-2008, 01:55 AM
~kurt
 
Posts: n/a
Re: How can I handle files with Chinese name

Steven Woody <narkewoody@gmail.com> wrote:
>
> I am not sure, what kind of file system can handle my files. What I
> currently used are ext3. I know in Windows, these files name can be


It isn't the file system - ext3 obviously handles the files just fine if
you can read them under X. It is the shell that can't interpret the
characters.

A quick google search turned up:

<http://www.boutell.com/lsm/lsmbyid.cgi/000594>

"Description: CHDRV is a terminal wrapper which can simulate Chinese character
display on a Linux console.It work WITHOUT the help of X-windows."

It was Chinese you were talking about, right?

- Kurt
Reply With Quote
  #9 (permalink)  
Old 07-19-2008, 05:01 PM
Steven Woody
 
Posts: n/a
Re: How can I handle files with Chinese name

On Jul 18, 12:54 pm, ~kurt <actinouran...@earthlink.net> wrote:
> Steven Woody <narkewo...@gmail.com> wrote:
>
> > 1. mv/cp these files to the fat32 partition and handle them in XP;
> > 2. burn them directly on to DVDs using growisofs.

>
> > But I found, using any method above, files appears in the fat32
> > partition or DVD are lost their real names, I means they became
> > \031\032\021 ... in any OS.

>
> The best way to back up, or move files around, is to tar them up. At the
> very least, you should be able to back the files up with tar. If, after
> un-tar'ing the file on the XP box, the names are still not readable, it may
> be the XP system doesn't have the language stuff installed, or that it uses
> a different scheme for such languages.
>
> - Kurt


Thank you Kurt for the example and explanations !
Reply With Quote
  #10 (permalink)  
Old 07-19-2008, 05:01 PM
Steven Woody
 
Posts: n/a
Re: How can I handle files with Chinese name

On Jul 19, 9:55 am, ~kurt <actinouran...@earthlink.net> wrote:
> Steven Woody <narkewo...@gmail.com> wrote:
>
> > I am not sure, what kind of file system can handle my files. What I
> > currently used are ext3. I know in Windows, these files name can be

>
> It isn't the file system - ext3 obviously handles the files just fine if
> you can read them under X. It is the shell that can't interpret the
> characters.
>
> A quick google search turned up:
>
> <http://www.boutell.com/lsm/lsmbyid.cgi/000594>
>
> "Description: CHDRV is a terminal wrapper which can simulate Chinese character
> display on a Linux console.It work WITHOUT the help of X-windows."
>
> It was Chinese you were talking about, right?
>
> - Kurt


I guess you're right ... and, I am study ...
Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Linux > Slackware


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:18 AM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109