We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36632
    • 202 Posts
    Working on a site with strict DTD and no charset setting.

    Trying to display the left and right square brackets. None of the formatting options work. Site works fine but I think I need more than that.

    The database uses utf8 but doesn't want to display [ and ] via [ and ]
      • 31946
      • 116 Posts
      It's important wink I often had to work on sites which were not utf-8 and had my problems...
      When the content in the Database is utf-8 encoded, you must also connect to the Database with utf-8.
      Search for: "SET NAMES utf8".
      Then also the html/php files itself should be utf-8 encoded as well as the html charset.
        • 3749
        • 24,544 Posts
        First, try adding this in the head section:

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 


        If that doesn't do it, make sure the DB itself and all the actual data in the DB (all tables and fields) is also in UTF-8, not just the MySQL setting.

        If it's not, see this: http://bobsguides.com/convert-db-utf8.html

        ---------------------------------------------------------------------------------------------------------------
        PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
        MODx info for everyone: http://bobsguides.com/MODx.html
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting