 <p>You should not be using HTML Entities in XML. Using normal UTF-8 characters should be fine.</p> <p>The occurrence of <code>OsnabrÃ¼ck</code> means that at some point, most likely, the city name is processed as ISO-8859-1 instead of UTF-8. It is not <code>htmlentities()</code>'s fault. You need to find that point and fix it.</p>