How to display Chinese characters in UXTerm&vi?

Hello everybody! I meet a puzzled problem.

Current Environment
FreeBSD 8.0 Release: Standard Installation
xorg-minimal-7.4_4: Port Installation
xterm-253: Port Installation
dwm-5.7.2: Port Installation
wqy-fonts-28801102,1: Port Installation (chinese fonts supporting ISO10646-1; have fonts.dir)

/etc/X11/xorg.conf
Code:
...
Section "Files"
        ModulePath  "/usr/local/lib/xorg/modules/"
        FontPath    "/usr/local/lib/X11/fonts/wqy/"
...
EndSection

Section "Module"
...
        Load "freetype"
...
EndSection
...

~/.xinitrc
Code:
exec /usr/local/bin/dwm

~/.login_conf (have using "cap_mkdb .login_conf")
Code:
me:\
  :charset=iso-10646-1:\
  :lang=zh_CN.ISO10646-1:

~/UXTerm
Code:
*VT100.font: -wenquanyi-wenquanyi bitmap song-bold-r-normal--13-130-75-75-p-80-iso10646-1
*VT100.utf8Fonts.font: -wenquanyi-wenquanyi bitmap song-bold-r-normal--13-130-75-75-p-80-iso10646-1

When I use "startx" enter dwm and press Alt+Shift+Enter to open UXTerm and input "ls ~", all files and directories named with Chinese characters display some "?":
attachment.php
If I use vi to open the file that including some Chinese characters, the interface is:
attachment.php
I changed to other wqy fonts supporting ISO10646-1 and the problem still existing.

I press Alt+Shift+Q to Quit and some error info display on console mode:
Code:
(EE) Failed to load module "freetype" (module does not exist, 0)
failed to set mttr: Device not configured
warning: no locale support
dwm: missing fontset: ISO8859-1

Reboot the computer, still ...

Need help, thanks!
 
This is the UXTerm interface after input "ls":
attachment.php


This is the vi interface including some Chinese characters:
attachment.php
 

Attachments

  • attach1.png
    attach1.png
    428 bytes · Views: 1,525
  • attach2.png
    attach2.png
    449 bytes · Views: 2,559
xterm has support utf8
xterm default font
Code:
xterm -fn -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
that support unicode ,default size is 12.

if you want to use xft:
Code:
xterm*locale:           true
xterm*utf8Title:        true
xterm*menuLocale:       zh_CN.UTF-8
! TrueType font
XTerm*faceName: xft: Bitstream Vera Sans Mono:pixelsize=12
xterm*faceNameDoublesize: xft: Wenquanyi bitmap song:pixelsize=12
xterm*eightBitOutput:   true
xterm*eightBitInput:    true
xterm*eightBitSelectTypes: true
xterm*wideChars:        true
xterm*utf8:             1
put them in your xresources file !
 
Thanks for all help, I have solved the problem. The main reason is encoding, because the Windows(ver.CN) use GB2312/GBK/GB18030 encoding. After copy these files&dirs, I should use some Ports to convert their encoding from GB* to UTF-8:

Ports:convmv - converts filenames from one encoding to another

Ports:enca -- detect and convert encoding of text files
 
Back
Top