[SOLVED]Getting Conky to display Chinese

How do I get my conky to display Chinese? I have some Chinese songs and the mpd thing in conky just shows the artist's names as boxes. I have scim pinyin installed, by the way.
Also, on pypanel, it won't display the chinese fonts as well, though it displays the words correctly on the sonata program and title itself.
Last edited by zephyrus17 (2008-10-15 14:46:35)

It didn't work. Chinese fonts are still showing boxes and special characters. Here's my conkyrc, just for reference, with the mpd part at the bottom.
###Configuration###
# maintain spacing between certain elements
use_spacer right
# set to yes if you want conky to be forked in the background
background yes
use_xft yes
override_utf8_locale no
# Xft font when Xft is enabled
xftfont Sans-12
#xftfont DejaVu Sans-8
#xftfont wenquanyi-zenhei:size=8
#xftfont DejaVu Sans Mono-8
#xftfont Bitstream Vera Sans Mono:size=8
#xftfont Andale Mono-9
#xftfont Clean-8
#xftfont cubicfive10:pixelsize=9
#xftfont squaredance10:pixelsize=14
#xftfont swf!t_v02:pixelsize=10
# Text alpha when using Xft
xftalpha 1
mail_spool $MAIL
# Update interval in seconds
update_interval 1
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_transparent yes
own_window_type override
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
#minimum_size 1200 0
#maximum_width 1490
# Draw shadows for the text?
draw_shades yes
# Draw outlines that amplifies text?
draw_outline no
# Draw borders around text
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_margin 0
# border width
border_width 0
# Default colors and also border colors, grey90 == #e5e5e5
default_color white
default_shade_color black
default_outline_color DarkGrey
color3 white
color1 black
color2 888888 #dark grey
color3 CECECE #white-ish
# Text alignment, other possible values are commented
alignment tm
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right
#alignment middle_right
#alignment bottom_left
# Gap between borders of screen and text
gap_x 25
gap_y 60
# Subtract file system buffers from used memory?
no_buffers yes
# set to yes if you want all text to be in uppercase
uppercase no
short_units 1
###End of configuration###
# stuff after 'TEXT' will be formatted on screen
TEXT
${font bulletballs aoe:size=17}b$font ${user_names}@$nodename
${font stylebats:size=17}2$font ${uptime}
${font stylebats:size=17}y$font ${battery_percent}%
${font stylebats:size=17}q$font ${ibm_temps 0}C
${font stylebats:size=17}p$font ${cpu cpu0}%
${font stylebats:size=17}h$font $memperc%
${font pizzadude bullets:size=17}r$font ${fs_used /}/ ${fs_size}
${font pizzadude bullets:size=17}z$font ${fs_used /home}/ ${fs_size /home}
${font pizzadude bullets:size=17}N$font ${upspeed eth0}kb/s
${font pizzadude bullets:size=17}T$font ${downspeed eth0}kb/s
${font WenQuanYi Zenhei:size=10}${mpd_artist}$font
Last edited by zephyrus17 (2008-10-14 11:01:05)

Similar Messages

  • Any chance I can get my e71 display Chinese?

    I just got my e71 and its great. However I also view a lof of files in Chinese. Any chance I can get it to display Chinese characters instead of some weird squres? Thanks.

    Hi roywang25,
    Welcome to the Nokia forum.
    If your E71 doesn’t have Chinese installed, you’ll need to get a language pack land including Chinese.
    There are 2 options that can be done by a Nokia Care Points:
    1. Installation of the language pack (this application will erase if hard reset)
    2. Flash of the phone with the language version (this will be permanent)
    Please contact your local Nokia care point :
    http://europe.nokia.com/find-a-store
    Let me know how you get on so that I can troubleshoot further, if necessary.
    regards,
    Manududu3
    Press the 'Accept As Solution' icon if I have solved your problem, Kudos my post if my advice has helped you!

  • [SOLVED]get ncmpcpp to display music tags with latin characters

    ok; so i have a few mp3 with non-standard characters "e" with an accent, "a" with a squiggly, that sort of thing (sorry i don't know the actual names of those characters).
    in ncmpc the names are displayed as like "Axe" or the copyright symbol and ncmpc throws up an error about 'unable to convert to ANSCII something or other...'; they looked much the same as the filenames were displayed in xterm (until i changed them).
    ncmpcpp just doesn't show those titles at all; though, the files still play just fine.
    i figured since i got these files from a windows friend, it was just something lost in translation; the other day however, i noticed amarok displays the titles correctly; moreover, i got conky to display the title names correctly with the "override_utf_locale yes" option
    i've been through the wiki about locales... a few times... here's some output
    $ locale
    LANG=en_US.UTF-8
    LC_CTYPE="C"
    LC_NUMERIC="C"
    LC_TIME="C"
    LC_COLLATE="C"
    LC_MONETARY="C"
    LC_MESSAGES="C"
    LC_PAPER="C"
    LC_NAME="C"
    LC_ADDRESS="C"
    LC_TELEPHONE="C"
    LC_MEASUREMENT="C"
    LC_IDENTIFICATION="C"
    LC_ALL=C
    $ locale -a
    C
    POSIX
    en_US
    en_US.iso88591
    en_US.utf8
    i have this in my .bashrc:
    export LC_ALL=C
    export LANG=en_US.UTF-8
    i did this because any other "export LC_ALL" settings make certain gtk apps complain about "error setting locale... defaulting to C"; conky complains too
    in the updated mpd.conf i found these two settings:
    #filesystem_charset "UTF-8"
    #id3v1_encoding "ISO-8859-1"
    i've tried uncommenting as is and switching id3v1_encoding to UTF-8; neither fixes my ncmpcpp problem
    would the mpd.conf settings help and what should i put in there
    i'm english speaking in the US, is "LC_ALL=C" the correct export? if i use ISO... or UTF-8 which ISO, and is it quotes or no quotes in .bashrc?
    the locale wiki wrote:For example you can use the en_US.iso8859 locale, though there is no advantage of using it.
    what does that mean?
    any help much appreciated
    pat
    edit: bahh, typos...
    Last edited by brisbin33 (2009-01-24 01:56:10)

    Chrysalis wrote:
    Try without the export lines in bashrc, I am not sure what the purpose of those is with en_US. Xterm should have utf support but to be sure try uxterm or some other terminal.
    Are the files on an ntfs partition by any chance? You have to mount it with a locale flag if so.
    thanks for the reply; i remember now that xterm needs to be opened as uxterm or xterm -u8 but i hadn't done that at the time, i just noticed the actual filenames had odd characters so i used tab-completion to just rename them to conventional letter equivalents.
    the files were copied _from_ an ntfs drive most likely, but they now reside on my ext3 partition.
    i'll comment that LC_ALL line in .bashrc but i think i have to login/out for that to take affect right, there's no unexport command?
    i do remember that i initially put in that LC_ALL=C export b/c w/o it, some programs would fail to open;
    earlier today i changed to LC_ALL=en_US.utf8 and i didn't get any complaints starting any apps.  what did happen was ncmpcpp went from not displaying those affected track titles at all to displaying them incorrectly (bad characters and odd line-wrapping).
    i think this may boil down to an id3v1 tag issue... it's pretty unimportant, just annoying

  • [Solved] Trying to get conky to display hebrew right...

    ok,
    So i've been using ${mpd_status} to display my songs on conky. However, some of my song's names are in hebrew, and hebrew has this problem that the terminal (and conky) display it the other way around. For exaple, hebrew word abc (a,b,c are hebrew letters) are displaed cba. So, I wrote 2 scripts: One to reverse the hebrew so on the terminal it looks "ok" (If it sounds rediculus to you, that's the way we get around the hebrew problem on computers, we've been doing it since computers were invented), and another to get the song's name and feed it to the first script.
    So, after all this work, I managed to make the scripts display hebrew song names on the terminal perfectly. However, conky refuses to show my song names. English eongs work fine, hebrew songs are just not displayed. This leads me to believe there's a problem. I was wondering if the kind people of the forum can help?
    PS I realize this is in the gray area between programming and help. That's why I put it in here. If the admins think there's a better place for it, please move this tread, thank you.
    revHebrew.py
    #!/usr/bin/python
    # This script takes a sentence as an argument and reverses all hebrew so it's
    # displayed right in the terminal and in conky.
    # USAGE: revHebrew.py [word1] [word2] [...]
    import sys
    ENGLISH_LETTERS = []
    UPPER_CASE_START_INDEX = 65
    LOWER_CASE_START_INDEX = 97
    NUMBER_OF_LETTERS_IN_ENGLISH = 26
    ENCODING = "utf-8"
    args = sys.argv[1:]
    def inEnglish(word):
    letters = list(word)
    for letter in letters:
    if letter in ENGLISH_LETTERS:
    return True
    return False
    def generateEnglishLetters():
    global ENGLISH_LETTERS
    ENGLISH_LETTERS = map(chr, range(UPPER_CASE_START_INDEX,
    UPPER_CASE_START_INDEX + NUMBER_OF_LETTERS_IN_ENGLISH) +
    range(LOWER_CASE_START_INDEX,LOWER_CASE_START_INDEX +
    NUMBER_OF_LETTERS_IN_ENGLISH))
    def reverseWord(word):
    return word[::-1]
    def reverseSentence(sentence):
    ltrSubsentence = []
    orderedSentence = []
    for word in sentence:
    if not inEnglish(word):
    ltrSubsentence.insert(0,word)
    else:
    ltrSubsentence.append(word)
    orderedSentence += ltrSubsentence
    ltrSubsentence = []
    orderedSentence += ltrSubsentence
    return orderedSentence
    def main():
    generateEnglishLetters()
    sentence = []
    for word in args:
    word = unicode(word, ENCODING)
    if not inEnglish(word):
    word = reverseWord(word)
    sentence.append(word)
    print u' '.join(reverseSentence(sentence))
    if __name__ == "__main__":
    main()
    hebrewMPDstatus.sh
    #!/bin/bash
    # A script to display hebrew and english songs from MPD in the right way
    # USAGE: hebrewMPDstatis.sh
    Title=`sonata info | grep Title: | cut -c8-`
    Artist=`sonata info | grep Artist: | cut -c9-`
    Song="$Title - $Artist"
    Command="python revHebrew.py ${Song}"
    eval $Command
    my .conkyrc
    #override_utf8_locale no
    format_human_readable yes
    double_buffer yes
    alignment top_middle
    background yes
    border_width 0
    cpu_avg_samples 2
    default_color white
    default_outline_color white
    default_shade_color white
    draw_borders no
    draw_graph_borders yes
    draw_outline no
    draw_shades no
    use_xft yes
    #xftfont Miriam Mono CLM:size=10
    xftfont Sans:size=10
    gap_x 0
    gap_y 0
    minimum_size 1672 0
    maximum_width 1672 0
    net_avg_samples 2
    no_buffers yes
    out_to_console no
    out_to_stderr no
    extra_newline no
    own_window yes
    own_window_class Conky
    own_window_type desktop
    own_window_transparent no
    own_window_hints undecorated,below,skip_taskbar,skip_pager,sticky
    stippled_borders 0
    update_interval 1.0
    uppercase no
    use_spacer yes
    show_graph_scale no
    show_graph_range no
    text_buffer_size 2048
    TEXT
    $nodename - $sysname $kernel on $machine :: ${color grey}Uptime:$color $uptime :: ${color grey}Frequency:$color $freq_g GHz :: ${color grey}Processes:$color $processes ${color grey}Running:$color $running_processes :: Net: Up:$color ${upspeed wlan0} ${color grey} Down:$color ${downspeed wlan0} :: ${color gray} Heat$color: Core0: ${font mpd:style=Bold:color=white:size=10}${execi 8 sensors | grep -A 1 'Core 0' | cut -c15-16 | sed '/^$/d'}C${font} Core1: ${font mpd:style=Bold:color=white:size=10}${execi 8 sensors | grep -A 1 'Core 1' | cut -c15-16 | sed '/^$/d'}C${font} temp: ${font mpd:style=Bold:color=white:size=10}${execi 8 sensors | grep -A 1 'temp1' | cut -c15-16 | sed '/^$/d'}C${font} :: ${font Miriam Mono CLM:style=Bold:size=10}${color lightblue}${execi 1 ~/hebrewMPDstatus.sh} - $mpd_status ${mpd_elapsed} ${color grey} ${mpd_bar 10}${color}
    #RAM Usage:$color $mem/$memmax - $memperc% ${membar 4} ${color grey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4} ${color grey}CPU Usage:$color $cpu% ${cpubar 4}
    Additional info: Unless I made a mistike, the script's output should be utf8. I looked around and apperantly sometimes the font's at fault so I decided to try a hebrew font, but no luck.
    SOLVED: Ok, solved my own problem. I saw this error:
    UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 0: ordinal not in range(128)
    and decided to invastigate it. It lead me to the following page: http://stackoverflow.com/questions/4924 … -in-python
    Basiclly turns out python's print command outputs in ASCII. I modified my main as instructed in the page, to change the default encoding to utf-8 and it did the trick!
    Another thing I had to do in my .conkyrc was to set "override_utf8_locale yes" in the config. I now have working hebrew in my conky! I hope others will find this post in the future and be saved the trouble.
    Last edited by Greenstuff (2010-05-29 00:06:20)

    Please don't necrobump: https://wiki.archlinux.org/index.php/Fo … Bumping.22
    Closing

  • Can't get conky-cli and bash scripts to both display in dwm statusbar!

    I'm trying to configure my dwm status bar to display some simple information using conky-cli and bash scripts. At first I tried just letting conky run the bash scripts (for network and volume state), but this increased my cpu usage by about 5%, which is significant considering I normally have 1-3% usage when idle. Also, I wanted to keep conky because it makes the display of certain information easy, such as cpu & RAM usage.
    The problem is I'm having trouble getting both to display side by side. Here are the relevant parts of my .xinitrc:
    network(){
    iwconfig wlan0 2>&1 | grep -q no\ wireless\ extensions\. && {
    echo wired
    exit 0
    essid=`iwconfig wlan0 | awk -F '"' '/ESSID/ {print $2}'`
    stngth=`iwconfig wlan0 | awk -F '=' '/Quality/ {print $2}' | cut -d '/' -f 1`
    bars=`expr $stngth / 10`
    case $bars in
    0) bar='[-------]' ;;
    1) bar='[#------]' ;;
    2) bar='[##-----]' ;;
    3) bar='[###----]' ;;
    4) bar='[####---]' ;;
    5) bar='[#####--]' ;;
    6) bar='[######-]' ;;
    7) bar='[#######]' ;;
    *) bar='[--!!!--]' ;;
    esac
    echo $essid$bar
    exit 0
    volume(){
    vol=$(amixer get Master | awk -F'[]%[]' '/%/ {if ($7 == "off") { print "MM" } else { print $2 }}' | head -n 1)
    echo Vol: $vol%
    exit 0
    conky | while true; read line; do xsetroot -name "`$line` `volume` `network` `date '+%a %m-%d-%Y %I:%M%p'`"; done &
    exec dwm
    (let me know if it would help to post any other files)
    For some reason when I run this I only get the network/volume scripts and date running, updating every second (I think). The conky line just doesn't show up. I don't know what could be wrong, since I didn't see any error messages.
    An even better solution would be to just have shell scripts to display CPU and MEM usage. I have a dual-core cpu, cpu0 and cpu1. I'd like to see both percentages if possible, or at least a percentage that is an accurate average of the two or something. In conky-cli I have something that shows:
    cpu0/1: xx% xx%
    Also, seeing RAM usage would help a lot. In conky it shows:
    mem: xx% (xxxMB)
    These are the ways I would like to have bash scripts show them, if possible, but I have zero skill in bash programming. I made this an option in case it's easier/cleaner/less resource hungry than a conky solution. Personally, if they're about the same in these aspects, I would prefer something with conky and the shell scripts because conky is so extensible, yet it's only flaw is executing scripts with minimal resource usage.
    Help?

    Thanks. I was thinking of using load average to save a few characters, but I didn't quite understand the numbers. I'll try that once I get to my Linux box, but could you please explain or post a link to something that explains load average (what's low, high, normal, etc.)?
    EDIT: I found a website that explains loadavg. I now have my dwm status bar displaying it perfectly (yay!). Now I just need to add a few more things like battery status, etc. and I might be done. I'll probably post here if I have more questions, though.
    Thanks for your help!
    Last edited by Allamgir (2009-07-18 14:41:11)

  • How can I get my desktop display to go to 1440*900?thanks[solved]

    I am using KDE 4,My problem is I can't set my graphics display to 1440*900
    In my searching
    I've found this on the Ubuntu forum, which seems to be my issue. It doesn't matter what I set up in xorg.conf file, it ignores it.
    It references a file called "kcmrandrrc", which doesn't seem to exist on my system. I am not sure where KDE is getting the 320x200, 320x240, 400x300,...,640x480, 800x600 and 1024x768 graphics modes. It's not from xorg.conf.
    I found this file...
    "krandrrc"
    Which contains the following...
    [Screen_0]
    OutputsUnified=false
    UnifiedRect=0,0,0,0
    UnifiedRotation=1
    [Screen_0_Output_CRT1]
    Active=true
    Rect=0,0,1154,768
    RefreshRate=0
    Rotation=1
    How can I get my desktop display to go to 1440*900
    thanks
    Last edited by icywalk (2010-01-27 10:18:30)

    What I was looking for was something along these lines:
    Section "Screen"
    Identifier "Screen0"
    Device "Card0"
    Monitor "Monitor0"
    DefaultDepth 24
    Option "NvAGP" "3"
    Option "Overlay" "False"
    Option "ConnectToAcpid" "False"
    SubSection "Display"
    Depth 1
    Modes "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
    SubSection "Display"
    Depth 4
    Modes "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
    SubSection "Display"
    Depth 8
    Modes "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
    SubSection "Display"
    Depth 15
    Modes "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
    SubSection "Display"
    Depth 16
    Modes "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
    SubSection "Display"
    Depth 24
    Modes "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
    SubSection "Display"
    Depth 32
    Modes "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
    EndSection
    Then you put in the 1400x900 that you wanted in the Modes line.
    If you are to use Xorg -configure successfully, you will need to do it from a console screen.  If you are using like kdm or gdm,  I would suggest that you log out, then go to a console screen (<ctrl><alt><f1>) and then log in to an account.  You will need to su, and then issue the following command to shut down x: telinit 3  that command should shut down X and your login manager.
    After that you can run Xorg -configure and do whatever else you need with it.
    Then, to get back to what you had before, the command telinit 5 should restore you back to your gdm or kdm or whatever.  (Normally <Ctrl><Alt><F7> will get you back to your login manager, if it doesn't try F6 or F8 until you find it.)
    HTH

  • I can't get iTunes (Mac OS X) to display chinese characters properly...

    Hi, I suppose it is because of the ID3 Tags being not properly read by itunes right? cos my Mac can display chinese no problems, specially it can display the mp3 files with it's chinese title in the Mac OS X Mountain Lion Finder no problem!
    I have tried somethning called the "Unicode Rewriter", tried converting using Source Encoding as : Big5, Big5_HKSCS, Cp9xx, EUC_TW, ISO2022CN_CNS, MS950... everthing they had for Chinese Traditional Encoding... They all showed up in itunes in Chinese Characters after converison, but it is not the correct word... somethimes it changed even into Korean!
    I read about ID3Mod2 but it costs 8US$, and I am not even sure it will work!?While the Unicode Rewriter is Free! but i dont understand why it didn't work though... it seem to be doing what it is suppose to, but just the encoding is maybe not the right one!?
    Anybody experiencing the same type of problem and found a solution?
    Thanks for your help

    Oh I forgot to mention that I'm using a straight cable as resource to the network. I do have access to the internet and some other networkdisks, But I can't access the main one, which is described above.
    Thanks!

  • To display chinese/japanese language Character filename - Java Programming

    In Our application supports to upload a file with name in chinese/japanese language Character. When user tries to download filedownload dialog box is appearing with the filename as junk characters.
    How to solve this issue to display the filename as uploaded.

    Have your tried googling your problem?
    I found this article: [http://www.chinesecomputing.com/programming/java.html|http://www.chinesecomputing.com/programming/java.html] That seems promising, but ofcourse I cant tell if it will work on your application without seeing a shred of code.
    Im certain there is others that has had the same problem before, and put up their solutions on the net.

  • Displaying chinese characters in browser

    Dear sirs,
    I am having the following issue in chinese internationalization.when i stored the JSP form parameters(typed in chinese) in database,it stored some kind of junk characters ....and when i displayed ,they showed like SMALL SMALL tables.... in my browser.
    Our project is java based web application.
    Java-1.5
    Mysql-5.0.24
    tomcat-5.5
    JSP-1.2
    servlet-2.0
    browser-mozilla firebox
    I set in my all JSP pages,
    ----->1.<%@ page contentType="text/html;charset="UTF-8" pageEncoding="UTF-8"%>
    ----->2.<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    in my JAVA files,i added,
    ----->String encode=ServletContext.getInitParameter("javaEncoding");
    ----->request.setCharacterEncoding(encode); (it gets encoding UTF-8 from web.xml file)
    In my MYSQL,i set...
    ----->mysql --default-character-set=utf8 -username -password -database
    so,i changed client,connection,results,system charactersets " utf8" and connection collation is "utf8".
    In my DATABASE connection String...i added,
    ------>useUnicode=true&characterEncoding=UTF-8
    In my TOMCAT web.xml file..i added these lines as i am using POST method for form.
    <context-param>
    <param-name>javaEncoding<param-name>
    <param-value>UTF-8<param-value>
    <context-param>
    still .i am unable to display chinese characters in my browser.
    but.when i am using getBytes() for all form parameters in JAVA file....i m able to store chinese in db and dispay in browser ....
    String param;
    ---->String param=newString(param.getBytes("ISO8859-1"),"UTF-8");
    Could anyone tell me another method for displaying chinese except this getBytes()..
    please help me out. i am trying to find out an alternative server-independent method for past two weeks.
    Advance thanks for reading and help.
    mullaimaran.

    Hi one_dane &Mr.Clap,
    Thank you for your help.
    At last i displayed chinese characters with out using getBytes() and web.xml configuration.
    My settings for displaying chinese....
    JSP :
    1<%@ page contentType="text/html;charset="UTF-8" pageEncoding="UTF-8"%>2.<HEAD>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    </HEAD>JAVA(Servlet):
    request.setCharacterEncoding("UTF-8");MYSQL:
    Mysql connection String...i added,
    ----> useUnicode=true&characterEncoding=UTF-8i m using linux terminal for mysql login.
    bash]$  mysql --default-character-set=utf8 -username -password -database nameSo, i changed these settiings in database
    mysql> show variables like '%char%';
    +--------------------------+----------------------------+
    | Variable_name | Value |
    +--------------------------+----------------------------+
    | character_set_client | utf8 |
    | character_set_connection | utf8 |
    | character_set_database | utf8 |
    | character_set_filesystem | binary |
    | character_set_results | utf8 |
    | character_set_server | utf8 |
    | character_set_system | utf8 |
    | character_sets_dir | /usr/share/mysql/charsets/ |
    +--------------------------+----------------------------+and set collation....
    mysql> show variables like '%col%';
    +---------------------------+-------------------+
    | Variable_name | Value |
    +---------------------------+-------------------+
    | collation_connection | utf8_general_ci |
    | collation_database | utf8_general_ci |
    | collation_server | utf8_general_ci |Once again thank you....for help.Keep your assistance in this forum.
    mullaimaran.

  • How to display Chinese in AWT (Urgent!)

    I have to problems,
    My computer is Win2K Traditional Chinese
    I try to run an application which Display chinese characters on the component of AWT. Although the application can run and can display correctly, there are exceptions. It throws the following error continuously,
    sun.io.UnknownCharacterException
    sun.io.UnknownCharacterException
    at sun.io.CharToByteISO8859_1.convert(Unknown Source)
    at sun.awt.PlatformFont.makeConvertedMultiFontChars(Unknown Source)
    at sun.awt.PlatformFont.makeConvertedMultiFontString(Unknown Source)
    at sun.awt.windows.WToolkit.eventLoop(Native Method)
    at sun.awt.windows.WToolkit.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    sun.io.UnknownCharacterException
    sun.io.UnknownCharacterException
    at sun.io.CharToByteISO8859_1.convert(Unknown Source)
    at sun.awt.PlatformFont.makeConvertedMultiFontChars(Unknown Source)
    at sun.awt.PlatformFont.makeConvertedMultiFontString(Unknown Source)
    at sun.awt.windows.WToolkit.eventLoop(Native Method)
    at sun.awt.windows.WToolkit.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    I try to encodes the string as follow, however, it throws another exception
    String x = new String("ChineseWordHere".getBytes("ISO-8859-1"), "Big5");
    It throws exception:
    java.io.UnsupportedEncodingException: Big-5
    at sun.io.Converters.getConverterClass(Unknown Source)
    at sun.io.Converters.newConverter(Unknown Source)
    at sun.io.ByteToCharConverter.getConverter(Unknown Source)
    at java.lang.String.getBTCConverter(Unknown Source)
    at java.lang.String.<init>(Unknown Source)
    at java.lang.String.<init>(Unknown Source)
    at Test1.<init>(Test1.java:8)
    at Test1.main(Test1.java:13)
    Do you know how to solve these two problems??
    (The most concern is that how to display Chinese in AWT)
    Thanks

    For starters, you shouldn't use the 8859 encoding since it only supports single byte representations. You should be able to successfully use UTF-8. Then to actually display the characters...or to type them, make sure you have an input method editor (IME) that supports the language - in theory if you are using a Chinese Win2k, you already have this with windows - just use the right font (I think MS Gothic should work) to show the characters. You might want to consider switching to Swing.
    Good luck

  • Displaying Chinese characters in SQL*Plus

    DB version: 11.2
    OS Version : AIX 6.1
    DB characterset:AL32UTF8
    To display chinese characters in SQL*Plus, I did the following:
    $ export LANG=zh_CN.UTF-8
    $ export LC_ALL=zh_CN.GB2312
    $ export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
    $
    $ sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.2.0 Production on ÐÇÆÚÈý 5ÔÂ 2 15:52:33 2012
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    With the Partitioning option
    SQL> ALTER SESSION SET NLS_LANGUAGE='SIMPLIFIED CHINESE';
    Session altered.
    SQL> ALTER SESSION SET NLS_TERRITORY='CHINA';
    Session altered.
    SQL> select unistr('\8349') from dual;  ---- not 100% sure if this is the way to verify if chinese characters can be displayed.
    UN
    ²Ý                 ----------------------------------------> Getting a junk character instead of chinese If I was using putty, are the above steps enough to get chinese characters displayed ?
    Our ssh client is Tectia (not putty).
    According the below ML Note, the SSH client has to configured correctly to use globalization features.
    +The correct NLS_LANG setting in Unix Environments [ID 264157.1]+
    Googling "Tectia + Chinese" didn't return useful results

    I understand that you are talking about Windows SSH Client.
    For Putty, you should set:
    $ export LANG=zh_CN.UTF-8
    $ export LC_ALL=zh_CN.UTF-8
    $ export NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8"
    and configure Putty in Window->Translation to use UTF-8.
    There is nothing about this subject on Tectia website and in their manuals, so my best guess is that the client requires Windows code page to work correctly. In such case you need to set your Windows system default locale (locale for non-Unicode programs) to Chinese and use the following settings on the server:
    $ export LANG=zh_CN.GBK
    $ export LC_ALL=zh_CN.GBK
    $ export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
    Verify with 'locale -a' that the setting zh_CN.GBK is supported on your system.
    -- Sergiusz

  • Display Chinese in JEditorPane

    Hi,
    I've a problem in displaying Chinese characters in Applet using JEditorPane. The java codes like this:
    JEditorPane editorPane = new JEditorPane();
    editorPane.setEditable(false);
    editorPane.setContentType("text/html; charset=big5");
    try {
    URL fileURL = getURL("testfile.html"); // get URL from getCodeBase()
    displayURL(fileURL, editorPane);
    } catch (Exception e) {}
    private void displayURL(URL url, JEditorPane editorPane) {
    try {
    editorPane.setPage(url);
    } catch (IOException e) {
    System.err.println("Attempted to read a bad URL: " + url);
    If I run these codes in JFrame, the Chinese characters can display correctly. But once I convert it to JApplet, all Chinese characters are changed to some squares or some special characters. Should I have something missing from my coding or I wrote something wrong in my code? Please help. Thanks.

    Hi,
    just a guess, i think u can use setContentType to set the MIME type
    Ashish

  • Display Chinese Word In Crystal Report's Cross-Tab

    Hi all,
    I am trying to display chinese word in my cystal report. It can be display correctly in detail, page header or formula. But when come to cross-tab, it just will show some funny symbol on it. any idea?
    i am using Crystal report xI release 2.
    Thank You
    Wong

    Hi,
    I solve it.Just for your reference, change the font type inside cross-tab.

  • Display Chinese character in iText

    hi all I need to display Chinese character in my pdf file
    I have iTextAsian.jar on my libraries , but the Chinese character did not show up
    nested1.addCell(new Phrase(chinessname));

    I download freetype-2.1.10,
    and I get ./configure --enable-static
    ./configure: make: not found
    how to continue ... inorder to create your owner font
    by the way I download the new extrajars-2.1.zip, this new jar supporting Chinese characters . but my first font is not working second font is work fine I don't know why?
    first one
    BaseFont bfChinese = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED); not working
    //second one
    BaseFont bfChinese= BaseFont.createFont("MSungStd-Light", "UniCNS-UCS2-H", BaseFont.NOT_EMBEDDED);
    Thank you!

  • JEditorPane -- displaying chinese characters in browser

    Is it possible to display chinese characters in an applet in a browser, I have read Jaric S.'s article on it.. but it is a little confusing.. however without doing any of that coding I have chinese showing up on one machine in IE, but not on any other machines with IE. Any thoughts anyone?

    Is it possible to display chinese characters in an
    applet in a browser, I have read Jaric S.'s article on
    it.. but it is a little confusing.. however without
    doing any of that coding I have chinese showing up on
    one machine in IE, but not on any other machines with
    IE. Any thoughts anyone?Browser Java is particularly sensitive to the version of Java the browser supports. Some browser companies, notably Microsoft, haven't updated their Java implementation in 4 years. Likewise users who are using old versions of other browsers probably have old versions of Java. This makes it very hard to predict how anything will work when it depends on a browser's VM.
    There are two ways to combat this. First you can use Sun's Java Plugin to replace the VM used by your browser with a modern one that supports your applet. Second, you can use Java WebStart which allows programs to be launched from a browser but run in an independant VM. These two things might help you get consistent results for your applets.
    Hope this helps,
    Brian.

Maybe you are looking for