Code: Select all
/dev/hda5 /win ntfs users,iocharset=cp936,noauto 0 0
Code: Select all
/dev/hda5 /mnt/win ntfs users,iocharset=utf8,noauto 0 0 Code: Select all
mount: wrong fs type, bad option, bad superblock on /dev/hda6,
or too many mounted file systems
akar wrote:這樣也可以, 如果你的 GNU/Linux環境是 UTF-8的編碼。
Code: Select all
/dev/hda5 /mnt/win ntfs users,iocharset=utf8,noauto 0 0
Code: Select all
LANG=en_US.UTF-8
LC_CTYPE=zh_CN.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
ts wrote:show your locale firstwildleaf wrote:如何知道我用的是不是utf8?
另外不管我用iocharset=cp936 还是utf8, mount 出错
iocharset=gb2312
iocharset will depend on your locale
I need more information, please runwildleaf wrote:which should i change to zh_CN? I still want to use english majorly but need to read chinese filenames.
I changed LANG=zh_CN.UTF-8, but mount still gave me the exact same error. Why?
Code: Select all
cat /etc/locales.build
ts wrote:I need more information, please runwildleaf wrote:which should i change to zh_CN? I still want to use english majorly but need to read chinese filenames.
I changed LANG=zh_CN.UTF-8, but mount still gave me the exact same error. Why?In addition, I'm wondering what codepage (437 or 936) you select for your vfat system when you genkernel --menuconfig all.Code: Select all
cat /etc/locales.build
Code: Select all
wildleaf portage # cat /etc/locales.build
# This file names the list of locales to be built when glibc is installed.
# The format is <locale>/<charmap>, where <locale> is a locale from the
# /usr/share/i18n/locales directory, and <charmap> is name of one of the files
# in /usr/share/i18n/charmaps/. All blank lines and lines starting with # are
# ignored. Here is an example:
# en_US/ISO-8859-1
en_US/ISO-8859-1
en_US.UTF-8/UTF-8
ja_JP.EUC-JP/EUC-JP
ja_JP.UTF-8/UTF-8
ja_JP/EUC-JP
en_HK/ISO-8859-1
en_PH/ISO-8859-1
de_DE/ISO-8859-1
de_DE@euro/ISO-8859-15
es_MX/ISO-8859-1
fa_IR/UTF-8
fr_FR/ISO-8859-1
fr_FR@euro/ISO-8859-15
it_IT/ISO-8859-1
我想你应该把中文加入你的 locales.build,法语和日语等其它语言没有必要,你可以把文件改成如下这样:wildleaf wrote: Here is the output of cat /etc/locales.build:Code: Select all
wildleaf portage # cat /etc/locales.build # This file names the list of locales to be built when glibc is installed. # The format is <locale>/<charmap>, where <locale> is a locale from the # /usr/share/i18n/locales directory, and <charmap> is name of one of the files # in /usr/share/i18n/charmaps/. All blank lines and lines starting with # are # ignored. Here is an example: # en_US/ISO-8859-1 en_US/ISO-8859-1 en_US.UTF-8/UTF-8 ja_JP.EUC-JP/EUC-JP ja_JP.UTF-8/UTF-8 ja_JP/EUC-JP en_HK/ISO-8859-1 en_PH/ISO-8859-1 de_DE/ISO-8859-1 de_DE@euro/ISO-8859-15 es_MX/ISO-8859-1 fa_IR/UTF-8 fr_FR/ISO-8859-1 fr_FR@euro/ISO-8859-15 it_IT/ISO-8859-1
Code: Select all
# This file names the list of locales to be built when glibc is installed.
# The format is <locale>/<charmap>, where <locale> is a locale from the
# /usr/share/i18n/locales directory, and <charmap> is name of one of the files
# in /usr/share/i18n/charmaps/. All blank lines and lines starting with # are
# ignored. Here is an example:
# en_US/ISO-8859-1
en_US/ISO-8859-1
en_US.UTF-8/UTF-8
zh_CN.UTF-8/UTF-8
zh_CN/gb2312
Code: Select all
export LC_ALL="zh_CN.UTF-8/UTF-8"Code: Select all
genkernel --menuconfig all ts wrote:补充一下,
当你:Code: Select all
genkernel --menuconfig all
DOS/VFAT 的编码选项时绝对不能选 cp936 或 gb2312,只能是默认值。要不任何 iocharset 选项都不会 work,我想这是核心的一个 bug。
如果之前設了locales.build而又沒有中文的locale,現在光是加進去是不行的,你得重編glibc才行。ts wrote:我想你应该把中文加入你的 locales.build,法语和日语等其它语言没有必要,你可以把文件改成如下这样:完了之后,试一下 mount 你的分区;不行,再试一下Code: Select all
# This file names the list of locales to be built when glibc is installed. # The format is <locale>/<charmap>, where <locale> is a locale from the # /usr/share/i18n/locales directory, and <charmap> is name of one of the files # in /usr/share/i18n/charmaps/. All blank lines and lines starting with # are # ignored. Here is an example: # en_US/ISO-8859-1 en_US/ISO-8859-1 en_US.UTF-8/UTF-8 zh_CN.UTF-8/UTF-8 zh_CN/gb2312再试一下用 iocharset=UTF8 来 mount 你的分区;如果还不行(这也是最可能发生的情况),你需要重新重新编译你的 kde,我就不知道你是否有时间和精力呢。Code: Select all
export LC_ALL="zh_CN.UTF-8/UTF-8"
这样就好wildleaf wrote:But the chinese file name does not show up correctly. What is the problem now?
Is this because I have to recompile glibc? And how can I recompile it? emerge glibc?
Code: Select all
emerge glibc刚才我又重新编译核心试了一下,只要你 make.conf 文件 USE 设了 nls,默认就是 utf8,编译时各语言包作为模块就行。Also, is it better to compile language support into kernel instead of modules?
Sorry still one more, How do I know my system is now using UTF8 or not , since the language option was not loaded ever.
Code: Select all
wildleaf mnt # mount -t ntfs -o iocharset=cp936 /dev/hda6 d
Code: Select all
wildleaf Chinese # dir
\301\367\320\320\270\350\307\372
wildleaf Chinese # ll
ls: �����: No such file or directory
total 0
wildleaf Chinese #
Code: Select all
# mount -t ntfs -o iocharset=cp936 /dev/hda6 d
# export LC_ALL=zh_CN.GB2312
#ls
Code: Select all
glc linux # grep -i nls .config |grep -v ^#
CONFIG_UDF_NLS=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_936=m
CONFIG_NLS_CODEPAGE_950=m
CONFIG_NLS_ISO8859_1=m
CONFIG_NLS_UTF8=m
Code: Select all
glc root # mount /dev/hda6 /mnt/C
glc root # lsmod
Module Size Used by
nls_iso8859_1 4096 1
nvidia 4814004 12
eepro100 25868 0
Code: Select all
glc root # umount /mnt/C
glc root # mount -o iocharset=utf8 /dev/hda6 /mnt/C
glc root # lsmod
Module Size Used by
nls_utf8 1920 1
nls_iso8859_1 4096 0
Code: Select all
wildleaf Chinese # grep -i nls /usr/src/linux/.config |grep -v ^#
CONFIG_UDF_NLS=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_CODEPAGE_936=m
CONFIG_NLS_CODEPAGE_950=m
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_UTF8=m
Code: Select all
Module Size Used by
nls_utf8 2688 0
nls_cp950 104832 0
nls_cp936 127232 1
ntfs 143632 1
e100 31360 0
I have overlook, your preferred codepage is zh_CN.UTF-8, sowildleaf wrote:I had no luck to make this work:(
I use this to mountCode: Select all
wildleaf mnt # mount -t ntfs -o iocharset=cp936 /dev/hda6 d
Code: Select all
wildleaf mnt # mount -t ntfs -o iocharset=utf8 /dev/hda6 d
wildleaf mnt # ls d
Code: Select all
$ export LC_CTYPE="zh_CN.UTF-8"
Code: Select all
$ touch /tmp/中文文件名.txt
$ ls /tmp/
I tried this utf8 before, didn't work either.akar wrote:
I have overlook, your preferred codepage is zh_CN.UTF-8, soto see if it works.Code: Select all
wildleaf mnt # mount -t ntfs -o iocharset=utf8 /dev/hda6 d wildleaf mnt # ls d
I've no problem to create and see chinese name while i'm in gnome, but i cant see chinese names without it. Also, the mount is still not working.---If the above still not work !! ---
Hmmm,,,,, i should invite you to create a file with Chinese name to test if your system is Chinese ready.
at least set LC_CTYPE to processing chinese characters.Code: Select all
$ export LC_CTYPE="zh_CN.UTF-8"
TestCase: if the file with chinese name created under Linux native file sytem is handled correctly.Code: Select all
$ touch /tmp/中文文件名.txt $ ls /tmp/
Code: Select all
$ mount
/dev/hda6 on /mnt/d type ntfs (rw,noexec,nosuid,nodev,umask=0022)
/dev/hda7 on /mnt/e type ntfs (rw,noexec,nosuid,nodev,umask=0022) Code: Select all
/dev/hda6 on /mnt/D type vfat (rw,noexec,nosuid,nodev,umask=022,iocharset=utf8,iocharset=utf8)
akar wrote:: btw, i have changed the passwd of the account "testuser".
i found you have recompiled the kernel! now the nls modules are compiled into kernel.Make sure you are using the correct kernel to boot up your Gentoo, (and of coz the new compiled version has properly installed). otherwise mounting with option of "iocharset=utf8" will prompt you an error.
During my login session, i found your have mounted two ntfs, but WITHOUT the iocharset=utf8 option. was it having problem when mounting with such option?
mine is something like:Code: Select all
$ mount /dev/hda6 on /mnt/d type ntfs (rw,noexec,nosuid,nodev,umask=0022) /dev/hda7 on /mnt/e type ntfs (rw,noexec,nosuid,nodev,umask=0022)Code: Select all
/dev/hda6 on /mnt/D type vfat (rw,noexec,nosuid,nodev,umask=022,iocharset=utf8,iocharset=utf8)