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

question about codepage!
question about codepage!
hi, i used the following code to set the exported dwg-file's codepage:
//
...
oddbdatabaseptr ptroddb = pservice->createdatabase(true,oddb::kmetric);
odcodepageid sysid;
sysid = pservice->systemcodepage();
oddbsetdwgcodepage(*ptroddb, sysid);
...
//
but it seems that oddbsetdwgcodepage() didn't work. when i run my application on the windows whose codepage is 950, systemcodepage return cp_ansi_950, but the exported dwg-file's codepage is cp_ansi_936.
why? whether there are some problem in my code or i should use another's method to set the file's codepage?
btw, are there some other methods to set a dwg-file's codepage?
last edited by pqcyy; 6th june 2005 at 10:29 pmfff">.
createdatabase() calls oddbsystemservices::systemcodepage() to set drawing's code page. so the call to global function is not required.
if you have not overridden implementation of this function in exsystemservices it should work.
you have sources of this function in examples/exservices/exsystemservices.
sergey slezkin
thanks!
sorry, i used oddbsetdwgcodepage at other place, that set the codepage to cp_ansi_936. that is reason why the dwgfile's codepage is always 936.
best regards!
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)