ubuntu挂载iso镜像后文件名出现乱码怎么解决? -----【已解决】

为当前最终发行版之前的所有版本提供支持
回复
头像
Sunmover
帖子: 2339
注册时间: 2010-05-24 13:02
来自: 星城长沙
送出感谢: 0
接收感谢: 4 次

ubuntu挂载iso镜像后文件名出现乱码怎么解决? -----【已解决】

#1

帖子 Sunmover » 2011-01-04 15:55

打开一张光盘查看里面的内容,发现文件名乱码了,请问怎么解决?谢谢!
nautilus.png

=================================================================================
问题解决了,按照规矩公布解决过程/方法:
参考文章:linux挂载iso文件时消除中文乱码 - JAVA EYE

代码: 全选

sudo mount -t iso9660 -o loop,iocharset=utf-8,utf8 cd.iso /media/cd 

#上面的cd.iso换成你的iso镜像文件路径,/media/cd这个cd目录如果没有建立可以使用命令 sudo mkdir -p /media/cd 
主要加上iocharset和utf8两个选项。

有些情况下可能utf8不行,再试试gb2312或gb18030之类的。

man mount for ISO9660 写了: 贴出这段关于挂载ISO的内容以方便查找
Mount options for iso9660
ISO 9660 is a standard describing a filesystem structure to be used on
CD-ROMs. (This filesystem type is also seen on some DVDs. See also the
udf filesystem.)

Normal iso9660 filenames appear in a 8.3 format (i.e., DOS-like
restrictions on filename length), and in addition all characters are in
upper case. Also there is no field for file ownership, protection,
number of links, provision for block/character devices, etc.

Rock Ridge is an extension to iso9660 that provides all of these unix
like features. Basically there are extensions to each directory record
that supply all of the additional information, and when Rock Ridge is
in use, the filesystem is indistinguishable from a normal UNIX filesys‐
tem (except that it is read-only, of course).

norock Disable the use of Rock Ridge extensions, even if available. Cf.
map.

nojoliet
Disable the use of Microsoft Joliet extensions, even if avail‐
able. Cf. map.

check={r[elaxed]|s[trict]}
With check=relaxed, a filename is first converted to lower case
before doing the lookup. This is probably only meaningful
together with norock and map=normal. (Default: check=strict.)
uid=value and gid=value
Give all files in the filesystem the indicated user or group id,
possibly overriding the information found in the Rock Ridge
extensions. (Default: uid=0,gid=0.)

map={n[ormal]|o[ff]|a[corn]}
For non-Rock Ridge volumes, normal name translation maps upper
to lower case ASCII, drops a trailing `;1', and converts `;' to
`.'. With map=off no name translation is done. See norock.
(Default: map=normal.) map=acorn is like map=normal but also
apply Acorn extensions if present.

mode=value
For non-Rock Ridge volumes, give all files the indicated mode.
(Default: read permission for everybody.) Since Linux 2.1.37
one no longer needs to specify the mode in decimal. (Octal is
indicated by a leading 0.)

unhide Also show hidden and associated files. (If the ordinary files
and the associated or hidden files have the same filenames, this
may make the ordinary files inaccessible.)

block={512|1024|2048}
Set the block size to the indicated value. (Default:
block=1024.)

conv={a[uto]|b[inary]|m[text]|t[ext]}
(Default: conv=binary.) Since Linux 1.3.54 this option has no
effect anymore. (And non-binary settings used to be very dan‐
gerous, possibly leading to silent data corruption.)

cruft If the high byte of the file length contains other garbage, set
this mount option to ignore the high order bits of the file
length. This implies that a file cannot be larger than 16MB.
session=x
Select number of session on multisession CD. (Since 2.3.4.)

sbsector=xxx
Session begins from sector xxx. (Since 2.3.4.)

The following options are the same as for vfat and specifying them only
makes sense when using discs encoded using Microsoft's Joliet exten‐
sions.

iocharset=value
Character set to use for converting 16 bit Unicode characters on
CD to 8 bit characters. The default is iso8859-1.

utf8 Convert 16 bit Unicode characters on CD to UTF-8
---------------------------------------------------------------------------------------------------------------------------------------------
mount_iso.png
功德圆满咯。。。哈哈。。。^_^
上次由 Sunmover 在 2011-01-06 17:59,总共编辑 2 次。
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid
送出感谢: 1 次
接收感谢: 23 次

Re: 文件名乱码。。。

#2

帖子 leeaman » 2011-01-04 15:59

这个字体....挂载参数不对?
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
头像
Sunmover
帖子: 2339
注册时间: 2010-05-24 13:02
来自: 星城长沙
送出感谢: 0
接收感谢: 4 次

Re: 文件名乱码。。。

#3

帖子 Sunmover » 2011-01-04 16:04

leeaman 写了:这个字体....挂载参数不对?
怎样正确挂载呢?
moderaterain
帖子: 97
注册时间: 2008-12-31 23:16
送出感谢: 0
接收感谢: 0

Re: 文件名乱码。。。

#4

帖子 moderaterain » 2011-01-04 16:39

是不是iso9660的格式被作为udf挂载了之类的
头像
shadowmoon23
帖子: 287
注册时间: 2008-11-06 11:52
来自: 长沙
送出感谢: 0
接收感谢: 1 次
联系:

Re: 文件名乱码。。。

#5

帖子 shadowmoon23 » 2011-01-04 16:48

lz你用的字体是什么?华康少女?
头像
Sunmover
帖子: 2339
注册时间: 2010-05-24 13:02
来自: 星城长沙
送出感谢: 0
接收感谢: 4 次

Re: 文件名乱码。。。

#6

帖子 Sunmover » 2011-01-05 1:58

顶起 :em06
头像
shadowmoon23
帖子: 287
注册时间: 2008-11-06 11:52
来自: 长沙
送出感谢: 0
接收感谢: 1 次
联系:

Re: 文件名乱码。。。

#7

帖子 shadowmoon23 » 2011-01-05 17:02

Sunmover 写了:顶起 :em06
别光自己顶贴呀,把你图中的字体共享一下给大家不?
头像
astolia
论坛版主
帖子: 3107
注册时间: 2008-09-18 13:11
送出感谢: 1 次
接收感谢: 512 次

Re: 文件名乱码。。。

#8

帖子 astolia » 2011-01-05 17:18

这个问题随便google一下答案就出来了,设置一下mount时用的字符集
头像
Sunmover
帖子: 2339
注册时间: 2010-05-24 13:02
来自: 星城长沙
送出感谢: 0
接收感谢: 4 次

Re: 文件名乱码。。。

#9

帖子 Sunmover » 2011-01-05 17:20

shadowmoon23 写了:
Sunmover 写了:顶起 :em06
别光自己顶贴呀,把你图中的字体共享一下给大家不?
已经发过去了注意查收。
头像
Sunmover
帖子: 2339
注册时间: 2010-05-24 13:02
来自: 星城长沙
送出感谢: 0
接收感谢: 4 次

Re: 文件名乱码。。。

#10

帖子 Sunmover » 2011-01-06 1:15

问题解决了。
感谢:
leeaman、astolia
moderaterain、shadowmoon23
及前来看帖的朋友们,感谢大家热心关注&帮助。
头像
Sunmover
帖子: 2339
注册时间: 2010-05-24 13:02
来自: 星城长沙
送出感谢: 0
接收感谢: 4 次

Re: ubuntu挂载iso镜像后文件名出现乱码怎么解决? -----【已解决】

#11

帖子 Sunmover » 2011-01-06 18:01

编辑了帖子,顶一下让更多需要的朋友看到。。。 :em11
头像
astolia
论坛版主
帖子: 3107
注册时间: 2008-09-18 13:11
送出感谢: 1 次
接收感谢: 512 次

Re: ubuntu挂载iso镜像后文件名出现乱码怎么解决? -----【已解决】

#12

帖子 astolia » 2011-01-06 19:24

顺便说说现在用udisks来挂载比传统的mount更方便一些,不需要sudo
头像
photor
论坛版主
帖子: 11005
注册时间: 2008-04-26 12:41
送出感谢: 8 次
接收感谢: 36 次

Re: ubuntu挂载iso镜像后文件名出现乱码怎么解决? -----【已解决】

#13

帖子 photor » 2011-01-06 20:32

astolia 写了:顺便说说现在用udisks来挂载比传统的mount更方便一些,不需要sudo
udisk怎么弄? :em09
头像
Sunmover
帖子: 2339
注册时间: 2010-05-24 13:02
来自: 星城长沙
送出感谢: 0
接收感谢: 4 次

Re: ubuntu挂载iso镜像后文件名出现乱码怎么解决? -----【已解决】

#14

帖子 Sunmover » 2011-01-06 23:32

photor 写了:
astolia 写了:顺便说说现在用udisks来挂载比传统的mount更方便一些,不需要sudo
udisk怎么弄? :em09
+1

暂且贴下man手册和help,顺便顶帖。。。
man udisks 写了:UDISKS(1) udisks UDISKS(1)

NAME
udisks - udisks command line tool

SYNOPSIS
udisks [OPTIONS]

DESCRIPTION
udisks is a simple command line client for the udisks(7) system bus service.

OPTIONS
--dump
Dump all information about all devices. Please include this when filing bugs.

--enumerate
Lists all object paths of devices know to the daemon.

--enumerate-device-files
Lists all device files of devices know to the daemon.

--monitor
Connect to the daemon and print a line every time an event happens.

--monitor-detail
Like --monitor but prints the full details of the device whenever an event happens.

--show-info device_file
Shows information about device_file.

--inhibit-polling device_file [-- program arg ...]
Inhibits polling on device_file. If no program is given, polling is inhibited until Ctrl+C is pressed. Otherwise the program is spawned and the polling
is only inhibited until the program terminates.

--poll-for-media device_file
Polls device_file to perform media detection.
--inhibit-all-polling [-- program arg ...]
Inhibits polling on all devices. If no program is given, polling is inhibited until Ctrl+C is pressed. Otherwise the program is spawned and the polling
is only inhibited until the program terminates.

--mount device_file [--mount-fstype fstype] [--mount-options options]
Mounts the device represented by device_file using the file system fstype and a comma-separated list of options.

--unmount device_file [--unmount-options options]
Unmounts the device represented by device_file using a comma-separated list of options.

--detach device_file [--detach-options options]
Detaches (e.g. powering down the physical port the device is connected to) the device represented by device_file using a comma-separated list of options.

--ata-smart-refresh device_file [--ata-smart-wakeup]
Refreshes ATA SMART data for device_file. If the disk is sleeping it will not be woken up unless --ata-smart-wakeup is passed. will be used.

--ata-smart-refresh device_file --ata-smart-simulate blob
Read ATA SMART data from blob for device_file. This can only be done by the super user and is typically used for testing that clients relying on the ATA
SMART data provided by udisks behave correctly. The libatasmart git repository at http://git.0pointer.de/?p=libatasmart.git;a=summary contains a
collection of blobs from failing disks.

--inhibit [-- program arg ...]
Inhibits clients from invoking methods on the daemon that require authorization (all methods will return the org.freedesktop.UDisks.Error.Inhibited
error) if the caller is not the super user. This is typically used by OS installers and other programs that expects full control of the system,
specifically to avoid automounting devices. Only the super user can do this.

If no program is given, the daemon is inhibited until Ctrl+C is pressed. Otherwise the program is spawned and the daemon is only inhibited until the
program terminates.

--set-spindown device_file --spindown-timeout seconds [-- program arg ...]
Configures disk spindown timeout on device_file to seconds. See the section called “SPINNING DOWN DISKS” for important information before using this
option.
If no program is given, the spindown time will be used until Ctrl+C is pressed. Otherwise the program is spawned and the the spindown timeout will only
be used until the program terminates.

--help
Show help options.

SPINNING DOWN DISKS
Caution should be exercised when configuring disk spin down timeouts.

Note that every time a disk is spun down, the “start-stop-count” ATA SMART attribute will increase by 1 and most disks are only good for a limited number
(typically 50,000 but it varies by manufacturer and model). In addition, the drive may take as long as 30 seconds to respond to subsequent disk access – most
drives are typically faster, see the “spin-up-time” ATA SMART attribute.

On the other hand, cautious use (e.g. using conservative timeouts) of the ability to spin down disks, can be a good way to trade power consumption (typically
8 vs 1 Watts for 3.5" drives) and heat emission for a slightly higher latency.

AUTHOR
Written by David Zeuthen david@fubar.dk with a lot of help from many others.

BUGS
Please send bug reports to either the distribution bug tracker or the upstream bug tracker at http://bugs.freedesktop.org/enter_bug.c ... uct=udisks.

SEE ALSO
udisks-daemon(8), udisks(7),

udisks April 2008 UDISKS(1)
Manual page udisks(1) line 68/107 (END)
===================================================================================
udisks -h 写了:用法:
udisks [选项...] udisks commandline tool

帮助选项:
-h, --help 显示帮助选项

应用程序选项:
--enumerate Enumerate objects paths for devices
--enumerate-device-files Enumerate device files for devices
--dump Dump all information about all devices
--monitor Monitor activity from the disk daemon
--monitor-detail Monitor with detail
--show-info Show information about a device file
--inhibit-polling Inhibit polling
--inhibit-all-polling Inhibit all polling
--poll-for-media Poll for media
--set-spindown Set spindown timeout for drive
--set-spindown-all Set spindown timeout for all drives
--spindown-timeout Spindown timeout in seconds
--inhibit Inhibit the daemon
--mount Mount the given device
--mount-fstype Specify file system type
--mount-options Mount options separated by comma
--unmount Unmount the given device
--unmount-options Unmount options separated by comma
--detach Detach the given device
--detach-options Detach options separated by comma
--ata-smart-refresh Refresh ATA SMART data
--ata-smart-wakeup Wake up the disk if it is not awake
--ata-smart-simulate Inject libatasmart BLOB for testing

See the udisks man page for details.
头像
chattan
论坛版主
帖子: 3922
注册时间: 2007-07-11 20:59
送出感谢: 0
接收感谢: 0
联系:

Re: ubuntu挂载iso镜像后文件名出现乱码怎么解决? -----【已解决】

#15

帖子 chattan » 2011-01-07 13:02

主题很MAC :em11
回复

回到 “老旧版本支持”