From: Jonathan B. <jbr...@ea...> - 2006-08-07 13:46:25
|
On Sun, 2006-08-06 at 14:24 -0300, Flavio Coelho wrote: > Hi, >=20 > apparently vpython 3.2.9 doesn't accept unicode strings in labels. It > does, however accept the latin-1(iso-8859-1) encoding without > problems: >=20 > In [3]: a=3Dvisual.label(text=3D's=E3o') >=20 > In [4]: a.text=3Dunicode ('s=E3o','latin-1') > -------------------------------------------------------------------------= -- > Boost.Python.ArgumentError Traceback (most > recent call last) >=20 > /home/fccoelho/<console>=20 >=20 > ArgumentError: Python argument types in > None.None(label, unicode) > did not match C++ signature: > None(visual::Label {lvalue}, std::string) >=20 > In [5]: unicode('s=E3o','latin-1') > Out[5]: u's\xe3o'=20 >=20 > In [6]: print unicode('s=E3o','latin-1') > s=E3o > I need to put unicode strings into labels, is there any way of doing > this? Will the next release of vpython handle Unicode? The 4.x series should handle Unicode strings, but only on Linux+Gtk (or one of the earlier Windows+GTK builds). HTH, -Jonathan |