-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
Bugs in text splitting for DXF output #986
Comments
Yep, you nailed it. The splitter is very naive |
rurban
added a commit
that referenced
this issue
Oct 4, 2024
Fixes most parts of GH #986 Remaining is proper utf8-len splitting. not 250 bytes but runes.
Fixed 1,3,4,5 so far. Proper unicode rune splitting seems to be implemented by transformation to UCS-2, and transformed back to UTF-8. |
rurban
added a commit
that referenced
this issue
Oct 4, 2024
Fixes most parts of GH #986 Remaining is proper utf8-len splitting. not 250 bytes but runes. This needs to be done by converting overlong strings to UCS-2, split them at 250 and then output them as UTF-8.
rurban
added a commit
that referenced
this issue
Oct 4, 2024
Fixes most parts of GH #986 (thanks to @vagran/Artyom Lebedev). Remaining is proper utf8-len splitting. not 250 bytes but runes. This needs to be done by converting overlong strings to UCS-2, split them at 250 and then output them as UTF-8.
rurban
added a commit
that referenced
this issue
Oct 4, 2024
Fixes most parts of GH #986 (thanks to @vagran/Artyom Lebedev). Remaining is proper utf8-len splitting. not 250 bytes but runes. This needs to be done by converting overlong strings to UCS-2, split them at 250 and then output them as UTF-8.
rurban
added a commit
that referenced
this issue
Oct 4, 2024
Fixes most parts of GH #986 (thanks to @vagran/Artyom Lebedev). Remaining is proper utf8-len splitting. not 250 bytes but runes. This needs to be done by converting overlong strings to UCS-2, split them at 250 and then output them as UTF-8.
rurban
added a commit
that referenced
this issue
Oct 4, 2024
Fixes most parts of GH #986 (thanks to @vagran/Artyom Lebedev). Remaining is proper utf8-len splitting. not 250 bytes but runes. This needs to be done by converting overlong strings to UCS-2, split them at 250 and then output them as UTF-8.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Invalid DXF file is produced when trying to convert DWG to DXF using
dwg2dxf
. Long text (usually in group1
) is split incorrectly. The continuation line does not have a preceding group code. Additionally unicode code points are split between the lines. Here is an example fragment of such result (sorry, I cannot share the full source file, it is proprietary):Looking into the code, I suspect several problems:
libredwg/src/out_dxf.c
Line 1270 in 07c078a
1
), all partial fragments (starting from the first one) should have group3
, and should be terminated by last fragment with group1
. Seems there is no place for such logic in the current implementation.The text was updated successfully, but these errors were encountered: