Description:I have used the javascript code for the conversion of json object to csv file and it was working fine when I have one language(English) but when i have added another language Arabic in my case , the generated csv showing special characters instead of Arabic characters and also mobile numbers are always displayed as exponential values in csv file.
Posted by: Junaid Aziz | Posted on: Dec 18, 2019
3
I understood your issues your first issue is an encoding issue for which you just need to update "csvEncoding" in that code and add "%EF%BB%BF" which will solve your first issue, now about your second issue it is due to an usual behavior of csv files, which displays large numbers in that exponential value,For a workaround to solve that you need to append '\u200C' character to specifically to your mobile number field or you can add '\u200C' (as it is an empty character so it will not effect any value, it will just display them as string) character to all your fields if you want to display them all as string. so after making these updates your code will be updated as follows.
Replied by: Khalid Abbas | Replied on: Dec 20, 2019