Closed TorbenOestergaard closed 8 years ago
That should work just fine! Go ahead and reopen if it doesn't work.
Hmm.. Doesn't work for me? I use version 0.7 and the special characters get replaced by a black rectangle/diamond with a white question mark inside. Do I need to change the font type somehow? (The default looks like Arial)
Try adding this tag near the top of the HTML file, if it's not there already:
<meta charset="utf-8">
I added the charset="utf" tag but apparently it didn't help. I have tried two of your examples: table.html (with tsv file and divgrid table) and slickgrid.html (with csv file). Tried both Chrome and Firefox (and emptied the cache and reloaded it). Any suggestions? Much appreciated..
Hi, Same problem here, we want to include some special chars for currencies (like cent symbol) and it doesn't work whatever charset is defined. I also tried to include html entities in dimension labels but they are not decoded. either.
Hmm, I can't seem to reproduce the issue on either the table.html example or slickgrid csv upload. It works in both Chrome and Firefox.
Are you both on Windows? I wonder if it's an OS-related issue somehow.
Edit: Tested using OS X
Could be OS-related. I'm testing this on Chrome and Firefox on Ubuntu.
I'm on windows..
This is the default style for the axis label font:
https://github.com/syntagmatic/parallel-coordinates/blob/master/d3.parcoords.css#L2
font: 14px sans-serif;
Can you try playing with other fonts to see if it works?
I was able to reproduce and got the upload example working by setting the FileReader encoding(http://stackoverflow.com/questions/12448595/get-set-file-encoding-with-javascripts-filereader) like:
reader.readAsText(file, 'ISO-8859-1');
@syntagmatic : Tried to change the font-family as you suggest. It changed the fonts accordingly, though still without the special characters.
@mcwillso : Great. Also works on my computer when running the "upload.html" example. This example uses a FileReader to read a csv file. Do you know a similar fix for the d3.tsv loader used in "table.html" among others?
So this is caused by ISO-8859-1 encoded data files?
Papaparse uses the FileReader API internally and could accept the same encoding config:
Haven't thought of looking at the encoding of the csv/tsv files. Apparently, my files were decoded as "UTF-8 without BOM". Changed the encoding to "UTF-8" in Notepad++ and now everything seems to work :-) Thanks a lot for all your feedback!
This is probably a trivial question. Is it possible to include special characters in the header of the tsv (or csv) file? For example, it is sometimes useful to include units such as "°" and "m²"
PS: Still love this plot. Thanks for all your efforts..