几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】question about codepage1 (http://www.dimcax.com/hust/showthread.php?t=18284)

yang686526 2009-05-07 12:08 PM

【转帖】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!


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