SteamLUG / steamlug.org

SteamLUG
https://steamlug.org
9 stars 11 forks source link

Fix encoding for event titles #136

Closed dscharrer closed 9 years ago

dscharrer commented 9 years ago

I didn't find a good way to set the encoding for DOMDocument::loadHTML(), and wrapping $str in a proper <html><head><meta charset=…></head><body>…</body></html> broke things - feel free to reject if you know a better way.

I think it's ok to hardcode UTF-8 here though as if I interpret the note on http://php.net/manual/en/class.domnode.php correctly the $e->nodeValue passed to parseEvent() should already be decoded to UTF-8.

meklu commented 9 years ago

Looks okay to me. Should probably also implement this in the parser's repo.