C# Mysql UTF8 Encoding

Viewed 55226

I have a mysql database with utf8_general_ci encoding ,

i'm connecting to the same database with php using utf-8 page and file encode and no problem but when connection mysql with C# i have letters like this غزة

i editit the connection string to be like this

server=localhost;password=root;User Id=root;Persist Security Info=True;database=mydatabase;Character Set=utf8

but the same problem .

8 Answers

this worked for me:

"datasource=xxx;port=3306;username=xxx;password=xxx;database=xxx;charset=utf8mb4"
Related