几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】multibyte text seems to be binary (http://www.dimcax.com/hust/showthread.php?t=17282)

yang686526 2009-05-06 06:15 PM

【转帖】multibyte text seems to be binary
 
multibyte text seems to be binary
multibyte text seems to be binary
hello all,
i am obviously doing something wrong with the attached drawing.
i always thought that text would either be ascii, or escaped as in /u+xxxx (unicode) or /m+yxxxx (multibyte), but the textstring value of a oddbtext entity seems to be all "binary/garbage" instead of being in the format of /m_yxxxx, (note however in autocad the properties do show the escape version of /m+yxxxx. ?????)
(note: that the "english" characters are all ok, just the japanese characters are not. )
all i do is as follows :
if ( entityptr->isa() == oddbtext::desc() ) {
oddbtextptr odtextptr = entityptr;
std::string stext = odtextptr->textstring().c_str();
std::cout << stext << std::endl;
}
i am using dd 1.13.
what am i doing wrong?
cheers
jason
attached files
dont worry, just figured out it is the actuall multibyte data, and so i must use is leadbyte etc... to work out the text.
sorry for wasting anyones time duh.


所有的时间均为北京时间。 现在的时间是 07:05 PM.