高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】reading dxf from version 2007
reading dxf from version 2007
reading dxf from version 2007
helloo
when i was reading dxf file from version 2007 and newer versions with code like
odstring str(pmtextent->contents());
in str.unicode_buffer has a \u+xxxx notation and ansi buffer is a empty !
for the version 2004, 2000, ... and older, this is not same, in these versions unicode text which we have was in unicode buffer od in ansi buffer text as u+xxxx notation.
can somebody explan to me, why from 2007 versions of dxf file, dwgdirect has a these differences !
it is problem for me, because odstring object return to me inccorect unicode string (odstring return to me for a unicode string, string like "u+xxxx").
in my application, i have to convert all unicode string which returning odstring class to the utf-8 encoding, and when odstring return to me "u+xxxx" notation i can not convert this to the utf-8 becuse it is all ansi all u letters and numbers !
this is only from 2007 versions.
can somebody tell me what is going on with this version and newer versions !
regards
ervin
attached files
hello ervin,
your attached file contains mtext with coding \u+xxxx. file has acad2007 (r21) version. start this version dxf file contains text string with utf-8 encoding. so acad saves text strings in dxf file as utf-8 (not \u+xxxx). your file possible was saved by dwgdirect but mtext content must be set by odstring inisialized like (dd_t("\u+xxxx") in this case.
acad corrects such text strings during loading dxf file. dwgdirect doen't make it yet. we will try to fix it in next release.
best regards,
sergey z.
|