Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garbled code read dwg #76

Open
8502596 opened this issue Feb 27, 2024 · 7 comments
Open

Garbled code read dwg #76

8502596 opened this issue Feb 27, 2024 · 7 comments

Comments

@8502596
Copy link

8502596 commented Feb 27, 2024

I know the encoding of this dwg file is in GBK or gb2312 ,But I cannot export dxf (v2007) correctly using the program, and I cannot even export any version correctly. It is interesting that using AutoCAD can correctly export UTF-8 format dxf without garbled text.
Please help me!In fact, aspose.cad provides a Java/. net version for exporting dxf files, but its format can only be exported as dxf-R12 version. I want dxf-v2007 version or higher to support gbk (Chinese).

It is very interesting that the converted dxf file cannot be opened by AutoCAD software, but can be opened by third-party software as follows. I guess when reading in, I should use GBK to read dwg and write in dxf (v2007), I should use UTF-8 to write in, so he needs a conversion, but I don't know how to modify it

image

The Test File
a-43.zip

@ferrellsl
Copy link

I can't open your zip file. My systems says it's corrupted.

@8502596
Copy link
Author

8502596 commented Feb 28, 2024

sorry Actually, his format is rar. You can use WinRAR to open it. In the Windows environment, I thought you needed to test the AutoCAD conversion file in the Windows environment.
this is zip file
a-43.zip
and The software is 360 compression, but it should be able to be opened with 7z

@8502596
Copy link
Author

8502596 commented Feb 28, 2024

You can use AutoCAD to open and convert to dxf (v2007) and above versions.AutoCAD can open converted dxf files. but After converting through the program, you will find that AutoCAD cannot open the converted dxf file. I think the problem lies in the coding

@ferrellsl
Copy link

ferrellsl commented Feb 28, 2024

It opens just fine in AutoCAD 2022. I was asked to supply a font SHX file upon opening as the original doesn't exist on my system. I just chose the first available font (@extfont2.shx) and this is the result.
image

@ferrellsl
Copy link

Here are the DWG and DXF from AutoCAD 2022 in ZIP format.
a-43-encoding.zip

@8502596
Copy link
Author

8502596 commented Feb 29, 2024

您说的这些 都是我知道的 我知道autocad 可以正常打开测试的文件以及导出。但如何通过libdxfrw 程序做到这一点?我通过另外一个开源项目cad2x封装了libdxfrw 也可以正常导出dxf 但导出的dxf 文件 用autocad 打不开,里面关于文字是乱码 ,可以根据第三方软件去打开
What you said is all I know. I know that AutoCAD can open test files and export them normally. But how can we achieve this through the libdxfrw program? I encapsulated libdxfrw through another open-source project, cad2x, and it can also export dxf normally. However, the exported dxf file cannot be opened using AutoCAD, and the text inside is garbled. It can be opened using third-party software 浩辰CAD
a-43.zip
dwg2dxf.zip
cad2x.zip
a-43-dxf.zip

@ferrellsl
Copy link

It appears to be related to this other open issue: #17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants