tws0002 / blur-dev

Automatically exported from code.google.com/p/blur-dev
0 stars 0 forks source link

UnicodeEncodeError with Korean characters #68

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
When I want get the path of the scene with Korean characters I am getting the 
error:
code
from Py3dsMax import mxs
mxs.maxFilePath
error:
'UnicodeEncodeError: 'ascii' codec can't encode characters in position 25-29: 
ordinal not in range(128)'

What version of the product are you using? On what operating system?
Windows 7 64 KR
Python 2.7.x
3ds Max 2012

Original issue reported on code.google.com by MateuszK...@gmail.com on 4 Apr 2013 at 4:57

GoogleCodeExporter commented 9 years ago
I confront with same problem to handle Japanese.

To fix this problem, change "ascii" to "mbcs" in wrapper.h and wrapper.cpp.

This is not complete solution but it works. one existing problem is
to print string to Command Logger. for example,

 print mxs.selection[0]

can't print multi byte character correctly but

 print unicode(mxs.selection[0], 'mbcs')

works fine.

Original comment by hchiy...@gmail.com on 17 Jan 2014 at 9:44