CSV to html – character encoding

Sometimes when fetching data from external files they are in a different encoding than expected (character encoding is in most cases UTF-8). This is possible to handle by using convert_encoding_from and convert_encoding_to. In this case below we convert from Windows-1252 (convert_encoding_from) character encoding to UTF-8 (convert_encoding_to). These setting are ONLY applied on external files. Internal files is handled automatically. Don’t try to use the setting if you’re not having issues with character encoding.

Shortcode
[csvtohtml_create source_type="visualizer_plugin" path="csvfiles" source_files="https://wibergsweb.se/wp-content/uploads/csvfiles/sweden.csv;norway;finland;iceland;denmark" convert_encoding_from="Windows-1252" convert_encoding_to="UTF-8"]
20112012201320142015
Sweden1.6%2.2%3.2%4.5%6.9%
Norway-6.6%1.2%1.4%1.9%2.0%
Finland-16.6%-14.2%10.2%11.0%13.2%
Iceland6.6%6.2%7.2%11.0%16.2%
Denmark-2.6%0%2.6%2.9%2.11%