¸ß¼¶»áÔ±
×¢²áÈÕÆÚ: 06-11
Ìû×Ó: 14579
¾«»ª: 1
ÏÖ½ð: 224494 ±ê×¼±Ò
×ʲú: 234494 ±ê×¼±Ò
|
¡¾×ªÌû¡¿pmtextent-contents90 return not correct value
pmtextent->contents() return not correct value
pmtextent->contents() return not correct value
hello
i attached dxf file which has one mtext entity with string "ÁÃãÐðÍÌÓÒÕõŠšÚ?".
when i was trying to get content of this mtext entity, opendwg library return to me correct string with 3 characters of "garbage" which was added to the end of string, something like "ÁÃãÐðÍÌÓÒÕõŠšÚ????". these 3 characters have a value "u+ffef". this unicode character does not exist !
can someone tell me why opendwg library return this garbage or is there any function for clear this garbage !?
i am using version 2.5.1
regards
ervin.
attached files
hello ervin,
there is no any "garbage" in next code under debugger:
code:
odstring sss = mtext->contents();
const odchar *ch = sss.c_str();
odansistring as(sss);
const char *ach = as.c_str();where we can see this garbage?
best regards,
sergey z.
hello sergey
at my side, i still have that "garbage" at the end of string ! (you can see jpg) i do not why, and do not have idea how to check this !
anyway, thanks to you for your respond ! if you have any idea for checking this, please tell me !
regard
ervin
attached images (234.1 kb, 13 views)
hell ervir,
could you load your file and save with another name as dxf? you may use dwgdirect example odamfcapp. you may try to do this with different version (release.debug, lib/dll which you have) and see result (dxf file) in text edit(search acdbmtext). could you report result?
best regards,
sergey z.
helloo
if i use odreadex there is no "garbage" at the end of string but with my app there is !
i upgraded my library now to the version 2.5.2. and now "garbage" is longer then with version 2.5.1
for debug version i am using libs and dll file from dd_vc8dbg folder and for release i am using libs from dd_vc8 folder !
with release version "garbage" is longer then with debug version !
only with debug version 2.5.1 i do not garbage ! with release, there is !
this is very strange problem for me, and i do not know how to check this !
if you have any suggestions please tell me !
ervin !
the length of string should be 16 and your debugger shows 19 for some reason...
have you processed somehow the mtext entity after loading 1.dxf and before displaying the contents of string at your breakpoint (jpg)?
sergey slezkin
hello sergey
i am not proccessed mtext before ! it is classic reading entitys from block !
i found that problem is with character u+00ff. it is "ÿ" !
if input string is ÁÃãÐðÍÌÓÒÕõŠÿšÚ?-> result is ÁÃãÐðÍÌÓÒÕõŠÿ
if input string is ÁÃãÐðÍÌÓÒÕ?b>ÿŠšÚŸ -> result is ÁÃãÐðÍÌÓÒÕ?b>ÿ?br /> if input string is ÁÃãÐðÍÌÓÒÕÿõŠšÚ?-y result is ÁÃãÐðÍÌÓÒÕÿÚŸ
and ... ...
character u+00ff consume my 3 characters for own displaying ! if it is at the end of string, i have a garbare because there is no characters for "consume" - that is problem !
i repeat that with odreadex everything ok, but with my app something wrong !
do you have any suggestions after this report !?
regerds
ervin
|