Skip to content
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

In tables special characters gets replaced with strange characters, the charset is not managed properly #13

Closed
lavjamanxd opened this issue Apr 9, 2019 · 6 comments · Fixed by #119

Comments

@lavjamanxd
Copy link

Issue
In tables if we are trying to use special characters, after formatting it will replace special characters to strange ones.

How to reproduce

  1. Try to format the attached test.file
    test-ansi.zip
    table-special-characters
@antham
Copy link
Owner

antham commented Apr 9, 2019

Thanks for reporting.

This is linked to your first ticket right ? What seems to be wrong is that tables don't support specials characters because the rest of the file is ok.

@lavjamanxd
Copy link
Author

I'm not sure if its connected to the first one. We just converted our files to extended ANSI (1252), after that we were able to run ghokin on them and then we noticed this one.

So, it happens in tables only.
That's why i tried to put that test string into multiple places in the file, to check where it can happen.

@antham
Copy link
Owner

antham commented Apr 10, 2019

Ok so could you provide me a file for the first ticket like in this one to reproduce the problem.

About this ticket, I guess the problem come from a library used in ghokin, not ghokin itself, it's going to be a bit tricky to fix if I am correct.

@lavjamanxd
Copy link
Author

Done, attached the file for the other issue.
Thanks!

@lavjamanxd
Copy link
Author

update:
This happens only if the Encoding is ANSI.
Formatting a file which has UTF-8 without BOM Encoding, works fine!

@antham
Copy link
Owner

antham commented Dec 29, 2023

So sorry to address this issue now, I wasn't able to figure out a proper fix at the time and left this aside in a corner of my mind.

My 2 cts about this issue is that we must manage only UTF-8 files and nothing else, it can sounds a bit let say "unfair" (can't find the appropriate word) but managing charset is quite a nightmare. I think this is the more straightforward and error-bug-free solution we can have.

So I added an automatic converter that will detect and change the charset of the file to UTF-8 and added a warning in the README, everything is in this release => https://github.com/antham/ghokin/releases/tag/v3.4.2

@antham antham changed the title In tables special characters gets replaced with strange charaters In tables special characters gets replaced with strange charaters, the charset is not managed properly Dec 29, 2023
@antham antham pinned this issue Dec 29, 2023
@antham antham changed the title In tables special characters gets replaced with strange charaters, the charset is not managed properly In tables special characters gets replaced with strange characters, the charset is not managed properly Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants