[GH-ISSUE #434] Issue: Corrupt file compiled using VS2008 on Windows #339

Closed
opened 2026-05-05 12:10:23 -06:00 by gitea-mirror · 9 comments
Owner

Originally created by @myspace9 on GitHub (Mar 11, 2024).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/434

After libxlaxwriter successfully compiled using VS2008 on the Windows platform, the xlsx file created was opened as a corrupted file. After decompressing the xlsx file and checking the components, it was found that there were errors in the XML content, such as garbled, binary, or missing content

Originally created by @myspace9 on GitHub (Mar 11, 2024). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/434 After libxlaxwriter successfully compiled using VS2008 on the Windows platform, the xlsx file created was opened as a corrupted file. After decompressing the xlsx file and checking the components, it was found that there were errors in the XML content, such as garbled, binary, or missing content
Author
Owner

@myspace9 commented on GitHub (Mar 11, 2024):

QQ截图20240311144815

<!-- gh-comment-id:1987734299 --> @myspace9 commented on GitHub (Mar 11, 2024): ![QQ截图20240311144815](https://github.com/jmcnamara/libxlsxwriter/assets/35983719/c2ace7ec-266d-438d-bb5c-b924a776578b)
Author
Owner

@myspace9 commented on GitHub (Mar 11, 2024):

this is ".rels "

<!-- gh-comment-id:1987735109 --> @myspace9 commented on GitHub (Mar 11, 2024): this is ".rels "
Author
Owner

@jmcnamara commented on GitHub (Mar 11, 2024):

It looks like the file may contain text that isn't UTF-8 which is the only encoding supported by Excel. Could that be the case? What text encoding are you using?

<!-- gh-comment-id:1987815646 --> @jmcnamara commented on GitHub (Mar 11, 2024): It looks like the file may contain text that isn't UTF-8 which is the only encoding supported by Excel. Could that be the case? What text encoding are you using?
Author
Owner

@myspace9 commented on GitHub (Mar 11, 2024):

It looks like the file may contain text that isn't UTF-8 which is the only encoding supported by Excel. Could that be the case? What text encoding are you using?

only i delete emyg_dtoa.c

<!-- gh-comment-id:1987967756 --> @myspace9 commented on GitHub (Mar 11, 2024): > It looks like the file may contain text that isn't UTF-8 which is the only encoding supported by Excel. Could that be the case? What text encoding are you using? only i delete emyg_dtoa.c
Author
Owner

@myspace9 commented on GitHub (Mar 11, 2024):

It looks like the file may contain text that isn't UTF-8 which is the only encoding supported by Excel. Could that be the case? What text encoding are you using?

only i delete emyg_dtoa.c

The problem has been resolved

<!-- gh-comment-id:1987972561 --> @myspace9 commented on GitHub (Mar 11, 2024): > > It looks like the file may contain text that isn't UTF-8 which is the only encoding supported by Excel. Could that be the case? What text encoding are you using? > > only i delete emyg_dtoa.c The problem has been resolved
Author
Owner

@myspace9 commented on GitHub (Mar 11, 2024):

but,the cell value can not support Chinese,do you have any good suggestions?
Thank you

<!-- gh-comment-id:1987975966 --> @myspace9 commented on GitHub (Mar 11, 2024): but,the cell value can not support Chinese,do you have any good suggestions? Thank you
Author
Owner

@jmcnamara commented on GitHub (Mar 11, 2024):

Just to be clear, is the issue resolve and what resolves it?

<!-- gh-comment-id:1988743452 --> @jmcnamara commented on GitHub (Mar 11, 2024): Just to be clear, is the issue resolve and what resolves it?
Author
Owner

@myspace9 commented on GitHub (Mar 12, 2024):

Just to be clear, is the issue resolve and what resolves it?

resolving the encoding by adding emyg_dtoa.c and for Chinese, setting the conversion from GBK to UTF8

<!-- gh-comment-id:1989781281 --> @myspace9 commented on GitHub (Mar 12, 2024): > Just to be clear, is the issue resolve and what resolves it? resolving the encoding by adding emyg_dtoa.c and for Chinese, setting the conversion from GBK to UTF8
Author
Owner

@jmcnamara commented on GitHub (Mar 12, 2024):

resolving the encoding by adding emyg_dtoa.c

That is interesting. Do you know why that fixed it?

The usual reason is that files are corrupted and then fixed by emyg_dtoa.c is that floats in the users locale are written with a comma as a decimal point like this: 1234,56. That happens in German locales. Could that be the case in your locale?

<!-- gh-comment-id:1991720807 --> @jmcnamara commented on GitHub (Mar 12, 2024): > resolving the encoding by adding emyg_dtoa.c That is interesting. Do you know why that fixed it? The usual reason is that files are corrupted and then fixed by `emyg_dtoa.c` is that floats in the users locale are written with a comma as a decimal point like this: `1234,56`. That happens in German locales. Could that be the case in your locale?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/libxlsxwriter#339
No description provided.