Skip to content
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

Non UTF-8 reported encoding trips up SimpleXML #30

Open
johnbillion opened this issue Jul 28, 2016 · 0 comments
Open

Non UTF-8 reported encoding trips up SimpleXML #30

johnbillion opened this issue Jul 28, 2016 · 0 comments

Comments

@johnbillion
Copy link
Member

johnbillion commented Jul 28, 2016

The XML files from IM report that they use UTF-16 encoding despite actually being encoded as UTF-8. This trips up simplexml_load_string() in the XML_Files::parse_item() method.

For this particular migration, I've overrwritten the Files::get_file_contents() method in the importer class and performed a string replacement:

$contents = str_replace( 'encoding="utf-16"', 'encoding="utf-8"', $contents );

HMCI should include a verification that UTF-8 is in use in the imported XML file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant