postgresql - postgres npgsql with c# - trying to write special characters to an ascii encoded database -


i using open source library npgsql http://pgfoundry.org/projects/npgsql/ manipulate third party data on postgres database. database encoded sql_ascii.

if run query using standard c# string

insert cities(cityname) values("köln")

the value shows in database looks more like: пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ

e.g. scrambled. i've spent many hours trying use different string encodings etc no success

sql_ascii means turn off encoding functionality in database. it's make sure clients use same encoding. believe npgsql use utf8, , cannot changed.

so there no "the value shows in database" - depending on encoding client talks database in.

the best way fix set actual encoding in database, , set useful - such utf8 or latin1.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -