-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
Cannot write Chinese text correctly #432
Comments
Hi @rogure, I've tested this code and write the result into a DWG: I'm using the master branch of this repo and seems to work. If you are using the package can release an update. |
Used the package and when I saved to DWG file, the Chinese TEXT and MTEXT displayed "?????" |
Hi @CatarinaVCh, I've tested this again and it seems that only To solve this you need to create a TextStyle style = new TextStyle("custom");
style.Filename = "romans.shx";
style.BigFontFilename = "chineset.shx"; Remember to add the style to your entities: TextEntity text = new TextEntity();
text.Value = "我的短信";
text.Style = style; Here is more information about the solution: Hope this helps. |
Hi, @DomCR , |
Which software are you using? |
Using Window 10, Autodesk Autocad 2019 and Microsoft Visual Studio Community 2022 (17.6.5) My code:
|
Thank you very much for checking the code, but it doesn't work for me))) |
You can try to change the file encoding then: CadDocument.Header.CodePage = "GB2312"; //Chinese simplified code page (GB2312) Maybe for your version is needed. Another test you can try is to save a document where the characters work and check the |
When I used it, I found that I could not write Chinese text into MTEXT. When I saved it to DWG file, the Chinese MTEXT displayed "?????". Symbol. How can this be resolved?
The text was updated successfully, but these errors were encountered: