Docs>Importer>Code Snippets

Alter import file encoding

The following code snippet allows you to change the file encoding of the file being imported, this is only neccessary if you see strange symbols in the importer preview.

A full list of supported encodings can be seen here.

function iwp_snippet_change_file_encoding($encoding) {
    return 'Windows-1252';
add_filter('iwp/importer/file_encoding', 'iwp_snippet_change_file_encoding' );

Next Article