MySql unicode encoding problem only question marks in column

Discussion in 'Databases' started by Medes, Sep 26, 2011.

  1. Hi all,

    According to Winhost the support for unicode characters are enabled on server level.
    and I provided the database and tables with ut8 encoding but still when I save kurdish and persian text it appears to be saved as question marks.

    My application is asp.net mvc 3 web application and uses MySql.data.dll to save data in the database (mysqlCommand.ExecuteScalar() ).

    have you any idea why text is not being encoded?
    thanks alot.
     
    Last edited by a moderator: Oct 14, 2015
  2. Hello,

    I have the same issue with mySql. When I launched my db backup on my local machine - all work fine, but I can not setup it here. I have the same encoding for db schema and all tables.
    I use utf8_unicode_ci encoding.
    My application is on asp.net MVC4.
    Maybe somebody already decided this problem?

    Thank you.
     
  3. I found solution.
    I should update connection string look like this:
    <add name="myconnection" connectionString="server=localhost;user id=myuser; password=; database=mydb; pooling=false; charset=utf8;" providerName="MySql.Data.MySqlClient"/>

    Found here:
    http://forums.asp.net/t/1597252.aspx/1
     
  4. Elshadriel

    Elshadriel Winhost Staff

    Glad you got it working.
     

Share This Page