locked
MySql With arabic unicode RRS feed

  • Question

  • User-169135161 posted

    Dear All

    I Buil New Asp.net  Project ..

    and I  Connect to mysql DB with MySqlConnctor ,The   Charset of the date  : <dfn title="Unicode (multilingual), case-insensitive">utf8_unicode_ci</dfn>  and contains arabic strings .

    The Data Appeare as Correpterd " يعمر درويش الزوني"

    But when it's appear in php .. every thing looks fine ..

    I try to ser the pages to utf8 , it's not worked ..

    and tried to set from connection string  as "Server=Myserver;Port=3306;Database=DB;Uid=root;Pwd=password;pooling=false;charset=utf8".. also didn't work ..

    any Soulutions or ideas for that ?? !

    Plz Help

    Thancks all

    Monday, January 6, 2014 11:32 AM

All replies

  • User1508394307 posted

    What is the encoding of the asp.net page or entire application? It might be that the string is coming correct as UTF-8 from the database but you show it using different encoding - for example CP1252.

    Try to set <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> in the page

    Monday, January 6, 2014 11:55 AM
  • User-169135161 posted

    I set It .. It's Not worked  .. 

    Plz Note that the mysql workbensh also show the data as correpted  ..

    Tuesday, January 7, 2014 4:15 AM
  • User1508394307 posted
    1. Go to php page, ensure that the text from database is correct. Then in IE - View - Encoding. What encoding is selected?
    2. Go to aspx page. Then in IE - View - Encoding. What encoding is selected?
    Tuesday, January 7, 2014 4:52 AM
  • User-169135161 posted

    Both are UTF8 

    Tuesday, January 7, 2014 5:11 AM
  • User1508394307 posted

    According to following links parameter name may be case sensitive with upper case C

    try to use "Charset=utf8" (instead of "charset=utf8")

    http://forums.asp.net/t/1934167.aspx
    http://stackoverflow.com/questions/942277/mysql-c-sharp-text-encoding-problems

    or "UTF8" http://www.connectionstrings.com/mysql-connector-odbc-3-51/

    Tuesday, January 7, 2014 5:30 AM
  • User-169135161 posted

    Thx  smirnov 

    utf8 and utf-8 is same  Data , Nothing Chanded ..

    UTF8 Is Wrong Conncetion String .. 

    Tuesday, January 7, 2014 8:25 AM