How to properly pass form content with special characters to SQL Server nvarchar field from PHP/Linux app? -


i have web application on ubuntu/php7/nginx stack data reporting purposes passes data sql server 2008 database. i'm using php7.0-sybase pdo package connect mssql. use prepared statement call stored procedure insert data. fields on sql server side nvarchar fields of various lengths. issue: form content web application special characters (newlines, accented letters, etc) shows garbled (chinese-esque) characters once inserted database. suspect encoding issue, haven't been able pinpoint issue i'm not knowledgeable in area.

if test doing insert directly on sql server using t-sql, text special characters shows correctly.

if dump encoding of text before send web app, tells me ascii, should compatible utf-8, correct? i've tried explicitly converting utf-8 before sending.

is there need set in configuration of db driver? or maybe driver doesn't know how handle data?

as note, we've experimented sending type of data varchar field, , text appears correctly, issue nvarchar data type.

as of now, sql server not support utf-8 stored data. nvarchar data type corresponds utf-16.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -