Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
UTF8 Support #10
Comments
jbroadway
closed this
in
ec52c2b
Oct 6, 2011
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rnuernberg commentedOct 6, 2011
When pushing data via save we have noticed, that special chars such as german umlaute (ä,ü,ö etc) are broken. checking your code we found that you handle non utf-8 chars only in _xml_entities.
this can be fixed by using mb_encode_numericentity:
function _xml_entities ($string) {
return mb_encode_numericentity($string, array(0x80, 0xff, 0, 0xff), "UTF-8");
}
Please note, that i took the second parameter of the function form the php.net documentation - i am not sure if that covers all relevant characters.... If you intend to use the code, you may want to have a closer look at that.