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
Can we support DownloadFileFromText with charset parameter or by default supporting special characters #22
Comments
Seems weird to me, the As you can see this extension method
Encodes all text to bytes using utf8, are you sure your problem exactly or may reside over there? I don't think this should be a JavaScript issue at all but maybe from c# encoding since JavaScript downloads the file as-is without any encoding or conversions. If you can send me a repro I may fix it. Can you confirm that before sending the text to the |
That error can also occur with the text editor and how does it's interprets the characters. What software you are using to open the csv file? MS Excel? |
Ok, good can you check which charset enconding is your MS Excel opening the csv file? |
Can you check if the .csv file opened in notepad to see if it's encoded wrongly? |
If opened in notepad is wrong then I will expose the charset encoding as an option with a default value to prevent breaking changes on the api. Please let me know asap. |
I would like also to know if after using the extension to base64encode does your encoding gets broken. |
Thanks for the investigation and the input I will take a deeper look on it. Can you share any sample data for me in json format? So I can use it has a test case? |
Wait a minute I read this in a hurry, in notepad++ the file opened ok. But in excel is wrong but after changing the encoding file format in notepad++ the excel read ok? |
This seems to be an issue with excel on how interprets csv filed but not rather with this library and the download process. |
Please upload for me a test json data so I can retest those special chars there seems to be a workaround this in the reference link. |
Here is the test json, I had same issue with it. Let me know if you need more information. Sorry for late reply, I think we have a huge time difference and I was really busy at work :) |
New release @stevanuswijaya I didn't had time to test your attached file data but it should work for you out of the box. I am in a hurry. Please try out this new package version. Take a look of this commit for more details. I turned on by default Please try it out and give me your feedback when ever it's possible. |
Ok, give me a time so I can retest this with more free time, reopening. |
Install-Package BlazorDownloadFile -Version 2.1.5 Please give me feedback if this does work for you properly now! |
Install-Package BlazorDownloadFile -Version 2.1.6
|
It's working properly now! Thanks for the help! |
Can we support DownloadFileFromText with charset parameter or by default supporting special characters? I'm currently trying to create a CSV file with Swedish characters in it (ÄÅÖäåö).
But the result is wrong:
It's working if I added the code as in the image.
Thanks
The text was updated successfully, but these errors were encountered: