-
Notifications
You must be signed in to change notification settings - Fork 95
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
ng-table export encoding to utf-8 hebrew letters #16
Comments
It appears that the library isn't exporting to UTF-8 correctly. Even using other languages - actually, other formats, such as latin-1 - we get the same problem. The file is being exported to ANSI (you can see it using a hex editor, for example) instead of UTF. Maybe it should using XRegExp (http://xregexp.com/) or some other lib, in order to support unicode RegEx... @update: As pointed out by @davisford the problem is with the viewers, not with the file format. |
AFAIK, a string in the DOM is UTF, and the plugin is doing nothing more than copying those strings into a big JS string. It's questionable whether JavaScript is UTF-16 or UCS-2...I guess it varies, but either way it shouldn't convert these to ASCII. Are you certain that whatever editor you are using to view them isn't changing the encoding or representation? Why not try dumping the contents of the plugin's export string instead to the console and see if it still matches what you see in the DOM. |
I thought that the regex filter would return an ANSI string, since it doesn't offer UTF support (e.g. "/u"). Actually, the output format is not changed. I checked the content with these free/opensource hex editors: FreeHexEditor, Frhed, HexEdit, wxHexEditor, and Mh-Nexus. Surprisingly, none of them have proper UTF support (except for the paid version of the first one). Microsoft Excel has the same problem. It tries to show the file using ANSI (I couldn't find any option to change that). Just with a paid editor in trial version I could check the format. So, the problem was really with the editors I had used. This could possibly answer @ihabassi's question. @davisford +1 |
Since this repo was not being updated, we forked it and would welcome suggestions like these that could improve the library. |
Have you fixed the problem with the ngtableExport to csv? I have ANSI encoding instead of utf8.What should I do ? |
@zejli I recommend you to check your file viewer. Probably it is not opening the file in UTF-8 but in ASCII (see my comments above). |
Yes I know this is the problem.How can I fix it please! |
While openin with Open Office Calc it asks in which encoding to open, if you choose UTF-8 problem will be solved |
Hi,
I tried to export to a csv file using the ng table export. I need the hebrew letters but till didn't get a hebrew letter.
Can you help me with that?
Thanks
The text was updated successfully, but these errors were encountered: