# MSDOSFS VFAT UTF-8 charset can't display chinese



## miracle20003 (May 10, 2012)

I use FreeBSD 9.0-RELEASE 
locale env is:
`# setenv LC_CTYPE zh_CN.UTF-8`

I use msdosfs *to* mount *a* fat32 filesystem
`# mount_msdosfs -D cp936 -L zh_CN.UTF-8 /dev/ad4s6 /mnt/d`
*I*t can't display chinese. *W*hat is the matter and how to fix it*?*

But use `# setenv LC_CTYPE zh_CN.GBK` and 
`# mount_msdosfs -D cp936 -L zh_CN.GBK /dev/ad4s6 /mnt/d`
this is no problem! *B*ut something with problem use GBK charset!

*A*nybody! I need you*r* help.


----------



## miracle20003 (May 11, 2012)

This is my x-windows evn:

```
gnome2-2.32.1_3     The "meta-port" for the GNOME 2 integrated X11 desktop
linux-f10-xorg-libs-7.4_1 Xorg libraries (Linux Fedora 10)
xorg-7.5.1          X.Org complete distribution metaport
xorg-apps-7.5.1     X.org apps meta-port
xorg-docs-1.6,1     X.org documentation files
xorg-drivers-7.5.1  X.org drivers meta-port
xorg-fonts-100dpi-7.5.1 X.Org 100dpi bitmap fonts
xorg-fonts-7.5.1    X.org fonts meta-port
xorg-fonts-75dpi-7.5.1 X.Org 75dpi bitmap fonts
xorg-fonts-cyrillic-7.5.1 X.Org Cyrillic bitmap fonts
xorg-fonts-miscbitmaps-7.5.1 X.Org miscellaneous bitmap fonts
xorg-fonts-truetype-7.5.1 X.Org TrueType fonts
xorg-fonts-type1-7.5.1 X.Org Type1 fonts
xorg-libraries-7.5.1 X.org libraries meta-port
xorg-server-1.7.7_3,1 X.Org X server and related programs
```


----------



## miracle20003 (May 11, 2012)

locale and .profile:

```
%locale ; cat .profile 
LANG=C
LC_CTYPE=zh_CN.UTF-8
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=
# $FreeBSD: release/9.0.0/share/skel/dot.profile 199243 2009-11-13 05:54:55Z ed $
#
# .profile - Bourne Shell startup script for login shells
#
# see also sh(1), environ(7).
#

# remove /usr/games if you want
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:$HOME/bin; export PATH

# Setting TERM is normally done through /etc/ttys.  Do only override
# if you're sure that you'll never log in via telnet or xterm or a
# serial line.
# TERM=xterm; 	export TERM

BLOCKSIZE=K;	export BLOCKSIZE
EDITOR=vi;   	export EDITOR
PAGER=more;  	export PAGER

# set ENV to a file invoked each time sh is started for interactive use.
ENV=$HOME/.shrc; export ENV

if [ -x /usr/games/fortune ] ; then /usr/games/fortune freebsd-tips ; fi


#export LC_CTYPE=zh_CN.GBK
export LC_ALL=zh_CN.UTF-8
export XMODIFIERS=@im=xim
export QT_IM_MODULE=xim
export GTK_IM_MODULE=xim
fcitx -d &
```


----------



## miracle20003 (May 11, 2012)

*M*y kernel:

```
%cat /sys/i386/conf/WEN 
#
# GENERIC -- Generic kernel configuration file for FreeBSD/i386
#
# For more information on this file, please read the config(5) manual page,
# and/or the handbook section on Kernel Configuration Files:
#
#    http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
#
# The handbook is also available locally in /usr/share/doc/handbook
# if you've installed the doc distribution, otherwise always see the
# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
# latest information.
#
# An exhaustive list of options and more detailed explanations of the
# device lines is also present in the ../../conf/NOTES and NOTES files.
# If you are in doubt as to the purpose or necessity of a line, check first
# in NOTES.
#
# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.553.2.7.2.1 2011/11/11 04:20:22 kensmith Exp $

cpu		I486_CPU
cpu		I586_CPU
cpu		I686_CPU
ident		WEN


#coustom add 


options       TEKEN_UTF8
#options      TEKEN_XTERM
#options       TEKEN_CONS25
makeoptions	DEBUG=-g		# Build kernel with gdb(1) debug symbols

options 	SCHED_ULE		# ULE scheduler
options 	PREEMPTION		# Enable kernel thread preemption
options 	INET			# InterNETworking
options 	INET6			# IPv6 communications protocols
options 	SCTP			# Stream Control Transmission Protocol
options 	FFS			# Berkeley Fast Filesystem
options 	SOFTUPDATES		# Enable FFS soft updates support
options 	UFS_ACL			# Support for access control lists
options 	UFS_DIRHASH		# Improve performance on big directories
options 	UFS_GJOURNAL		# Enable gjournal-based UFS journaling
options 	MD_ROOT			# MD is a potential root device
options 	NFSCL			# New Network Filesystem Client
options 	NFSD			# New Network Filesystem Server
options 	NFSLOCKD		# Network Lock Manager
options 	NFS_ROOT		# NFS usable as /, requires NFSCL
options 	MSDOSFS			# MSDOS Filesystem
options 	CD9660			# ISO 9660 Filesystem
options 	PROCFS			# Process filesystem (requires PSEUDOFS)
options 	PSEUDOFS		# Pseudo-filesystem framework
options 	GEOM_PART_GPT		# GUID Partition Tables.
options 	GEOM_LABEL		# Provides labelization
options 	COMPAT_FREEBSD4		# Compatible with FreeBSD4
options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6
options 	COMPAT_FREEBSD7		# Compatible with FreeBSD7
options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
options 	KTRACE			# ktrace(1) support
options 	STACK			# stack(9) support
options 	SYSVSHM			# SYSV-style shared memory
options 	SYSVMSG			# SYSV-style message queues
options 	SYSVSEM			# SYSV-style semaphores
options 	_KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options 	PRINTF_BUFR_SIZE=128	# Prevent printf output being interspersed.
options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
options 	HWPMC_HOOKS		# Necessary kernel hooks for hwpmc(4)
options 	AUDIT			# Security event auditing
options 	MAC			# TrustedBSD MAC Framework
#options 	KDTRACE_HOOKS		# Kernel DTrace hooks
options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
options 	KDB			# Kernel debugger related code
options 	KDB_TRACE		# Print a stack trace for a panic

# To make an SMP kernel, the next two lines are needed
options 	SMP			# Symmetric MultiProcessor Kernel
device		apic			# I/O APIC

# CPU frequency control
device		cpufreq

# Bus support.
device		acpi
#device		eisa
device		pci

# Floppy drives
#device		fdc

# ATA controllers
device		ahci		# AHCI-compatible SATA controllers
device		ata		# Legacy ATA/SATA controllers
options 	ATA_CAM		# Handle legacy controllers with CAM
options 	ATA_STATIC_ID	# Static device numbering
device		mvs		# Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA
device		siis		# SiliconImage SiI3124/SiI3132/SiI3531 SATA

# SCSI Controllers


# ATA/SCSI peripherals
device		scbus		# SCSI bus (required for ATA/SCSI)
device		ch		# SCSI media changers
device		da		# Direct Access (disks)
device		sa		# Sequential Access (tape etc)
device		cd		# CD
device		pass		# Passthrough device (direct ATA/SCSI access)
device		ses		# SCSI Environmental Services (and SAF-TE)

# RAID controllers interfaced to the SCSI subsystem


# RAID controllers


# atkbdc0 controls both the keyboard and the PS/2 mouse
device		atkbdc		# AT keyboard controller
device		atkbd		# AT keyboard
device		psm		# PS/2 mouse

device		kbdmux		# keyboard multiplexer

device		vga		# VGA video card driver

device		splash		# Splash screen and screen saver support

# syscons is the default console driver, resembling an SCO console
device		sc
options 	SC_PIXEL_MODE	# add support for the raster text mode

device		agp		# support several AGP chipsets

# Power management support (see NOTES for more options)
#device		apm
# Add suspend/resume support for the i8254.
device		pmtimer

# PCCARD (PCMCIA) support
# PCMCIA and cardbus bridge support


# Serial (COM) ports
device		uart		# Generic UART driver

# Parallel port
device		ppc
device		ppbus		# Parallel port bus (required)
device		lpt		# Printer
device		plip		# TCP/IP over parallel
device		ppi		# Parallel port interface device
#device		vpo		# Requires scbus and da

device		puc		# Multi I/O cards and multi-channel UARTs

# PCI Ethernet NICs.

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device		miibus		# MII bus support
device		age		# Attansic/Atheros L1 Gigabit Ethernet


# ISA Ethernet NICs.  pccard NICs included.

# 'device ed' requires 'device miibus'


# Wireless NIC cards


# Pseudo devices.
device		loop		# Network loopback
device		random		# Entropy device
device		ether		# Ethernet support
device		vlan		# 802.1Q VLAN support
device		tun		# Packet tunnel.
device		pty		# BSD-style compatibility pseudo ttys
device		md		# Memory "disks"
device		gif		# IPv6 and IPv4 tunneling
device		faith		# IPv6-to-IPv4 relaying (translation)
device		firmware	# firmware assist module

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device		bpf		# Berkeley packet filter

# USB support
options 	USB_DEBUG	# enable debug msgs
device		uhci		# UHCI PCI->USB interface
device		ohci		# OHCI PCI->USB interface
device		ehci		# EHCI PCI->USB interface (USB 2.0)
device		xhci		# XHCI PCI->USB interface (USB 3.0)
device		usb		# USB Bus (required)
#device		udbp		# USB Double Bulk Pipe devices (needs netgraph)
device		uhid		# "Human Interface Devices"
device		ukbd		# Keyboard
device		ulpt		# Printer
device		umass		# Disks/Mass storage - Requires scbus and da
device		ums		# Mouse
device		urio		# Diamond Rio 500 MP3 player
# USB Serial devices

# USB Ethernet, requires miibus

# USB Wireless


# FireWire support
device		firewire	# FireWire bus code
# sbp(4) works for some systems but causes boot failure on others
#device		sbp		# SCSI over FireWire (Requires scbus and da)
device		fwe		# Ethernet over FireWire (non-standard!)
device		fwip		# IP over FireWire (RFC 2734,3146)
device		dcons		# Dumb console driver
device		dcons_crom	# Configuration ROM for dcons

# Sound support
device		sound		# Generic sound driver (required)
device		snd_hda		# Intel High Definition Audio
```


----------

