查看单个帖子
旧 2009-05-06, 08:16 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】oddbtext textstring90 return issue

oddbtext textstring() return issue
oddbtext textstring() return issue
i've worked around the issue but oddbtext.textstring() doesn't seem to be null terminating some strings in some new autocad 2007 drawings. i've attached a drawing that was causing some issues.
attached files
hello ryan,
new autocad 2007 drawings have unicode strings. oddbtext.textstring() returns odstring. that problem do you have? could you explain your problem more detail?
best regards,
sergey z.
some of the strings from textstring() had tons of whitespace on the end of them giving a buffer overflow when using strcpy. this was fixed using strncpy but the whitespace is still there.
quote:
originally posted by ryan
some of the strings from textstring() had tons of whitespace on the end of them giving a buffer overflow when using strcpy. this was fixed using strncpy but the whitespace is still there.
try to use odstring::trimright() for removing whitespace on the end of string and set back this string to text.
note i have found only one text with about 14500 whitespace (handle 99ad9).
best regards,
sergey z.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)