We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42254
    • 6 Posts
    I am working on a site with pages in both Spanish and English. I had already coded the pages prior to installing modx. I have made a content chunk of some spanish text and saved it.

    The visual output in my browser shows correctly with accents etc. when I view source however the code is not shown but the accented characters show instead. When I try to upload the view:source output to the validator.w3.org site it cannot check the markup and gives the following error report:

    it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication.

    The error was: utf8 "\xC9" does not map to Unicode


    The chunk edit page specifies html and the content of the chunk was written with html character entities which still show in the chunk edit page.

    Why is the output not showing the html character entities?

    This question has been answered by exside. See the first response.

    • discuss.answer
      • 40045
      • 534 Posts
      Could you maybe post (parts of) that chunk? Why not just use a UTF8 database and then just writing in the characters with accents in clear text (without encoding them to entities or whatever)?

      I have just set up a site in german (umlauts), french (other accents), english (easy) and chinese (help!) like this and it works like a charm without encoding any of the characters...
        • 42254
        • 6 Posts
        Luckily I hadn't done too much with the database so I just deleted and made a new one (looking around at how to change a mysql database this seemed a more sensible option in my circumstances). With the database set up as utf-8 everything works as expected and I am able to validate the source. The main reason I coded the entities was because I am working with an english keyboard layout and it was as easy to copy and paste as anything else. Thanks for identifying the issue as I have more work to do and it will be much easier to copy submitted text as written without need to use entities.