Fix DXF encoding: convert TV strings to UTF-8
## Summary
Fixes encoding issues where LibreDWG was outputting DXF files with:
- UTF-8 encoded bytes in text fields
- But declaring CP1252 codepage in `$DWGCODEPAGE` header
This caused ezdxf to read the UTF-8 bytes as CP1252, creating surrogate characters (`\udcxx`) for undefined bytes in CP1252.
## Changes
1. **dwg_api.c**: Set default codepage to `CP_UTF8` (0) instead of `CP_ANSI_1252` (30)
2. **out_dxf.c**: Convert TV strings from source codepage to UTF-8 before output
3. **out_dxf.c**: Always declare UTF8 codepage in DXF output
## Impact
- DXF files will have properly converted UTF-8 text
- Compatible with standard DXF readers like ezdxf
- No more surrogate character encoding errors
合并状态:未合并 关闭于 2026-01-01 2 条评论