You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: DXF files converted by Filee cannot be opened in AR-CAD (Shift-JIS / ASCII DXF compatibility) #783
DXF files converted/exported using Filee cannot be opened in AR-CAD (a widely used 2D CAD software in Japan), reporting a read error. The same files, when exported as "AutoCAD 2000 DXF" directly from ZWCAD or AutoCAD, open without issues.
Root Cause Analysis
After investigating how AR-CAD parses DXF files, the issue appears to stem from two main factors in the CAD engine (ACadSharp):
Character Encoding (Shift-JIS / ANSI vs UTF-8):
AR-CAD only supports ANSI (Shift-JIS / CP932 for Japanese environments) when reading DXF.
If Filee / ACadSharp writes the DXF in UTF-8, AR-CAD fails to parse layers, text entities, or header strings and aborts reading.
ASCII vs Binary DXF:
AR-CAD does not support Binary DXF; it strictly requires ASCII DXF.
DXF Version Specification:
AR-CAD has the best compatibility with AutoCAD 2000 (AC1015) ASCII DXF.
Suggested Enhancements
Add an option in DXF export settings to choose the text encoding (e.g., Shift-JIS / CP932 or system ANSI, instead of strictly UTF-8).
Ensure DXF export defaults to ASCII format (or allow the user to explicitly select ASCII vs Binary).
Ensure header variables and table definitions conform strictly to standard AutoCAD 2000 (AC1015) requirements.
Thanks for the report! Two of the points are already how Filee writes DXF, so the cause is probably something else:
ASCII, never binary: Filee always writes ASCII DXF.
No UTF-8 before AutoCAD 2007: a DXF for AutoCAD 2000 (AC1015) stores its text in a code page, not UTF-8. Filee picks the code page from the drawing's text and writes it to $DWGCODEPAGE. For example, Japanese kana gives ANSI_932 (Shift-JIS).
One suspect: a drawing whose text is only kanji, with no kana, can get ANSI_950 (Big5) or ANSI_936 (GBK) instead of ANSI_932. Both can hold the same characters, and Chinese comes first on a tie. A Japanese-only program like AR-CAD may refuse that.
To find out, could you add:
The $DWGCODEPAGE value: open the converted DXF in Notepad, search for $DWGCODEPAGE, and copy the line after 3 (for example ANSI_932 or ANSI_950).
AR-CAD's exact message: a screenshot of the error.
A sample: the original drawing and Filee's output, zipped. A small drawing that shows the problem is enough.
The text in the drawing: Japanese with kana, Japanese kanji only, or Traditional Chinese?
If it is the code page, we can let the preset choose it, or prefer Shift-JIS on a Japanese system.
Thanks for checking.
1. **$DWGCODEPAGE:** `ANSI_932`
2. **AR-CAD error:** It only shows “エラー” (Error), with no detailed message.
3. **Sample files:** Sorry, I’m not able to upload the original
drawing or the exported file.
4. **Text in the drawing:** Japanese, including both kana and kanji.
Since the code page is already ANSI_932, the issue may not be the code
page detection in this case.
On Thu, 29 Oct 2026 19:17:13 -0700, Myeonggu Kim ***@***.***> wrote:
KnifeLemon left a comment (KnifeLemon/Filee#783)
Thanks for the report! Two of the points are already how Filee writes DXF, so the cause is probably something else:
- **ASCII, never binary:** Filee always writes ASCII DXF.
- **No UTF-8 before AutoCAD 2007:** a DXF for AutoCAD 2000 (AC1015) stores its text in a code page, not UTF-8. Filee picks the code page from the drawing's text and writes it to `$DWGCODEPAGE`. For example, Japanese kana gives `ANSI_932` (Shift-JIS).
**One suspect:** a drawing whose text is **only kanji, with no kana**, can get `ANSI_950` (Big5) or `ANSI_936` (GBK) instead of `ANSI_932`. Both can hold the same characters, and Chinese comes first on a tie. A Japanese-only program like AR-CAD may refuse that.
To find out, could you add:
1. **The `$DWGCODEPAGE` value:** open the converted DXF in Notepad, search for `$DWGCODEPAGE`, and copy the line after `3` (for example `ANSI_932` or `ANSI_950`).
2. **AR-CAD's exact message:** a screenshot of the error.
3. **A sample:** the original drawing and Filee's output, zipped. A small drawing that shows the problem is enough.
4. **The text in the drawing:** Japanese with kana, Japanese kanji only, or Traditional Chinese?
If it is the code page, we can let the preset choose it, or prefer Shift-JIS on a Japanese system.
--
Reply to this email directly or view it on GitHub:
#783 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
Thanks for checking! ANSI_932 with kana and kanji is the right code page, so that's ruled out.
Without a file we have to narrow it down another way. Could you try two things?
Other DXF versions. In the preset that makes the DXF (Settings → Presets → its CAD card), change the version and convert the same drawing again, then tell us which ones AR-CAD opens:
AutoCAD 2000
AutoCAD 2004
AutoCAD 2007 (UTF-8 text)
AutoCAD 2018
A test drawing you can share. In ZWCAD, draw one line and one Japanese text in a new drawing, save it, and convert it with Filee. If AR-CAD still says エラー on that, please attach both files. They hold nothing private, and with them we can find the exact part AR-CAD rejects.
Also, the next release updates ACadSharp, the library that writes the DXF, from 3.8.0 to 3.8.35 (#811), with many DXF writing fixes. It may be worth trying again then.
Activity
KnifeLemon commentedon Oct 30, 2026
Thanks for the report! Two of the points are already how Filee writes DXF, so the cause is probably something else:
$DWGCODEPAGE. For example, Japanese kana givesANSI_932(Shift-JIS).One suspect: a drawing whose text is only kanji, with no kana, can get
ANSI_950(Big5) orANSI_936(GBK) instead ofANSI_932. Both can hold the same characters, and Chinese comes first on a tie. A Japanese-only program like AR-CAD may refuse that.To find out, could you add:
$DWGCODEPAGEvalue: open the converted DXF in Notepad, search for$DWGCODEPAGE, and copy the line after3(for exampleANSI_932orANSI_950).If it is the code page, we can let the preset choose it, or prefer Shift-JIS on a Japanese system.
huangjhao5-boop commentedon Oct 30, 2026
KnifeLemon commentedon Oct 30, 2026
Thanks for checking!
ANSI_932with kana and kanji is the right code page, so that's ruled out.Without a file we have to narrow it down another way. Could you try two things?
Also, the next release updates ACadSharp, the library that writes the DXF, from 3.8.0 to 3.8.35 (#811), with many DXF writing fixes. It may be worth trying again then.