-
Notifications
You must be signed in to change notification settings - Fork 362
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
Special characters are broken on output #528
Comments
Hi @MichaelA59 , What do you mean that saving as txt works but saving as csv, doesn't? |
In the above code snippet, I have the |
That's my point. so the only think that I can think of is that you are opening the documents differently? |
@juanjoDiaz I have been facing the similar issue. I am opening the txt using Notepad and the csv using Microsoft Excel. The text file is showing the special characters properly but the csv file opened in Excel is giving out a cryptic output. |
Any news on this? I haven't been able to replicate the issue. |
This solution works to me: https://blog.theodo.com/2017/04/csv-excel-escape-from-the-encoding-hell-in-nodejs/
|
json2csv - 5.0.5
Node - 10.16.0
Running into an issue where special characters are being outputted incorrectly.
Input string:
Postică
Outputted as:
Postică
I need my file to be UTF-8 encoded (apparently doing this correctly) but also needs to account for special characters. If I export the file as a TXT file, the issue goes away, but that is not a viable solution for me. I need this exported as a CSV file.
Here's the function I built which uses the package. It accepts a JSON payload of data to compile the report.
This is being used as a module, not CLI.
The text was updated successfully, but these errors were encountered: