几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


回复
 
主题工具 搜索本主题 显示模式
旧 2009-05-05, 11:13 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】german characters, export in dxf

german characters, export in dxf
german characters, export in dxf
helloo
i have a question about germany chars (umlaut chars) 淠e鲋?
i want these chars stored in a dxf file but not in a \u+xxxx and \m+xxxx notation, only as a roman8 encoding (in a original form).
my application manipulate with japanese (sjis) and umlaut chars (roman8).
everything what i made for a japanese (sjis) chars does not work for a umlaut chars.
i prepared all my string in odansistring with code page cp_ansi_932 and give these objects to the dwgdirect library.
i also set generaly code page for hole dxf file to the cp_ansi_932, and everything work fine with japanesse chars (sjis encoded). my texts in dxf file when i exporting to the dxf file was stored as a multibyte and not in a \m+xxxx - that is what i want.
now if i have germany chars, nothing work correctly. at all placese where are germany chars, i have \u+xxxx notation, why that ?
i know that, cp_ansi_932 is not correct code_page for umlaut char, cp_ansi_1252 is (i think).
example:
odcharmapper::widechartomultibyte(cp_ansi_932,wcha t_tmp.asarrayptr(),wcslen(wchat_tmp.asarrayptr()), char_tmp);
with this example, if i have japanese chars, this function return correct value
if i have a umlaut chars, this function return \u+xxxx why that, this is converting to the mulibyte not to the unicode. with japanese, it is correct !
if i set another code page - cp_ansi_1252, with umlaut chars everythins is ok, but with japanese nothing, they are \u+xxxx again - i do not want that.
i remind that when it was dwgdirect library version1.xxxx (befeore unicode support) everythings work correctly.
now i have only troubles with these code pages and notations (\u+xxxx and \m+xxxx). i do not want these notations, i want original text in dxf file as i fullfill in dwgdirect entity !
i am upgrading my app with newest dwgdirects library and only have a problmes, and problems ! hah.
can someone explane to me with more details, which code page i have to set for hole dxf file, that ia can store japanese chars and unlaut chars (i remaind that i want it as a asci chars, do not want notations \u+ and \m+).
how i have to prepare my char pointers ? in my app all texts are handled as char *. i was trying with odansistring(char_pointer,some_code_page), but does not work with mix japanese and umlaut char. (sjis and roman8) !
kind regards
ervin
in old dwg/dxf versions strings were stored in mbcs according to drawing's code page. conversion was required only if you load a drawing of foreign code page. in latest dwg versions and at run-time (both autocad's and dwgdirect) all strings are stored in unicode and in latest dxf - in utf8. so while loading/saving dxf conversion is always performed.
all strings in older dwg files and dxf are assumed to be in drawing's code page. the only exception is mtext contents where font and charset can be switched in the middle of a string.
why it "worked previously"? it worked only if you load a drawing with the same code page as your computer has because no code page conversion was performed.
it's impossible to have strings in different code pages within the same drawing except mtext case mentioned above.
if you save a drawing in 932 code page and a 1252 character can't be converted to 932 cp than it's saved as \+uxxxx sequence.
this is not oda who decided to store unicode strings in dwg...
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】export a saved view in dxf yang686526 DirectDWG 0 2009-05-05 10:23 AM
【转帖】is it possible to export a dxf with different color geometry yang686526 SolidWorks二次开发 0 2009-04-13 12:24 PM
【转帖】create dxf macro yang686526 SolidWorks二次开发 0 2009-04-13 10:00 AM
【转帖】auto create 11 flat pattern and save as dxf yang686526 SolidWorks二次开发 0 2009-04-13 09:08 AM
Unicode、UCS、UTF、BMP、BOM huangyhg vc编程 2 2007-01-22 05:43 PM


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


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多