x First time here? Check out the FAQ
  • Avatar150posts462karma

    non english character does not display correctly If I use Mysql Database

    jivan thapa started this topic December 23, 2011 @ 11:33

    Umbraco verson 4.7.1

    I have one umbraco site that uses MySql Database. Problem is that it does not display correctly Nepalese characters.

    For example I have this character " " it displays correctly in RichText Editor. After I published the content It shows ?????????????????????????????????????????????????????????????????????????????? in webpage. but it displays correctly in RichText Editor.

    I also checked Tidy is set to Utf8.


    I have also another website that uses MSSQL Database. it works perfectly on that website. Problem is if i use MySql Database.

    Here is XSLT

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
      xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" 
      exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">
    <xsl:output method="xml" omit-xml-declaration="yes"/>
    <xsl:param name="currentPage"/>
    <xsl:template match="/">
    <!-- start writing XSLT -->
     <div class="sub-content-wrapper">
       <div class="content_border"
         <h3>  <xsl:value-of select="$currentPage/contentTitle"/></h3
          <xsl:if test="string-length($currentPage/contentImage)&gt;1">
            <img src="{$currentPage/contentImage}" width="600px"/>
         <xsl:value-of select="$currentPage/contentBody" disable-output-escaping="yes"/>    

    Any suggestions?





  • Avatar10079posts19006karma2015 MVP
    CoreadminMVPComment with ID: 101172
    Jan Skovgaard posted this reply December 23, 2011 @ 12:45

    Hi Jivan

    I think it has to do with the character set i MySQL. It's related to MySQL not Umbraco itself I think. It seems like it maybe has to do with the tables being created with a character set based on latin1 instead of utf8.

    You can read more about it here: http://alexking.org/blog/2008/03/06/mysql-latin1-utf8-conversion and here http://www.bluebox.net/news/2009/07/mysql_encoding

    I hope this helps.


Please login or Sign up To post replies