Panda3d can't display Tradiontal Chinese Charater ?

I had used code and modify it from this link-

panda3d.etc.cmu.edu/phpbb2/viewtopic.php?t=555

vvv------------------
import direct.directbase.DirectStart
from direct.showbase.DirectObject import DirectObject
from direct.gui.DirectGui import *
from pandac.PandaModules import *
from direct.gui.OnscreenText import OnscreenText
import codecs

class World(DirectObject):
def init(self):
font = loader.loadFont(‘kaiu.ttf’) # my window2000 Chinese font
text = TextNode(‘node name’)
text.setFont(font)
text.setEncoding(TextNode.EUtf8)
ustr = u’\ua4e5’ # one Traditional Chinese character
text.setText(codecs.utf_8_encode(ustr)[0])
textNodePath = aspect2d.attachNewNode(text)
textNodePath.setScale(0.07)

w = World()

run()
^^^------------------

but I got this error
vvv------------------
:text(warning): No definition in DFKai-SB Regular for Character 42213
^^^------------------
And Panda3d didn’t display correct “Chinese character”.

If panda3d-1.3.2 doesn’t support “Traditional Chinese” range ?

Panda supports all international characters, including Chinese characters.

The error message indicates that your font does not contain a definition for the character u’\ua4e5’ (which has unicode number 42213). Are you sure you are using the correct font?

David

Thanks your reply for this topic !!! :slight_smile:

Today, I tried it out !!!
In Taiwan with Windows2000 pc,
I had used below code to display Tradiontal Chinese.
And py-script the 1st line must add this:

[quote=“Omtiger”]

-- coding: cp950 -- <—### é€™è¡Œå¿…é ˆç”¨, æ‰