• How important is the charset setting?#

  • UltraSEF Reply #1, 4 months, 1 week ago

    Reply
    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 ]


  • Wanze Reply #2, 4 months, 1 week ago

    Reply
    It's important 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.


  • BobRay Reply #3, 4 months, 1 week ago

    Reply
    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