Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"CharacterSet" => SQLSRV_ENC_CHAR on Linux #515

Closed
gruyoman opened this issue Sep 6, 2017 · 5 comments
Closed

"CharacterSet" => SQLSRV_ENC_CHAR on Linux #515

gruyoman opened this issue Sep 6, 2017 · 5 comments

Comments

@gruyoman
Copy link

gruyoman commented Sep 6, 2017

In the Windows server "CharacterSet" => SQLSRV_ENC_CHAR is the default setting.
In Linux SQLSRV_ENC_CHAR exists or not? Even when I set it, it uses UTF-8.

Thanks

@Hadis-Knj
Copy link

@gruyoman SQLSRV_ENC_CHAR in linux only works with ASCII characters, and you should set the character set to utf-8 for non-ASCII characters. please see https://github.com/Microsoft/msphpsql#limitations

@Hadis-Knj
Copy link

@gruyoman is there anything else that we can help you in?

@gruyoman
Copy link
Author

gruyoman commented Sep 7, 2017

I've seen that in linux SQLSRV_ENC_CHAR behaves exactly like UTF-8. That means that SQLSRV_ENC_CHAR actually doesn't exist. The problem is that there isn't compatibility between windows and linux web application with SQLSRV_ENC_CHAR.
However I have one question: to use unicode chars i have to use N' prefix for nchar, nvarchar and ntext value. Is there any possibility to set something in php or apache to skip N' prefix because we have multidatabase application.
Thank you

@lilgreenbird
Copy link
Contributor

hi @gruyoman, that is not possible and as @Hadis-Fard mentioned above it's a limitation in the Linux driver. I have created a feature request for this we will look into supporting this in future releases.

@gruyoman
Copy link
Author

Ok, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants