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

sqlsrv UTF-8 changes #20

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

ianchanning
Copy link

Currently the sqlsrv driver doesn't properly support UTF-8 characters e.g. the Chinese characters for China (中国) unless you N prefix all strings to be N'string'. I am fairly certain this is harmless and a question to stack overflow concurred with this.

I have modified the value function to add the N prefix.

Please ignore the further change I made to the value function as it is purely a fix for CakePHP 1.2 compatibility.

@predominant
Copy link
Contributor

This doesn't correctly cover all cases.

If you take a look at the SQL Server Datasource for CakePHP 2.0, you will see that string and text fields are covered, and that more appropriate field lengths are used.

Further, the 2.0 datasource covers the string and text types int he value() method.

I'd refactor to correctly cover there, and then resubmit the pull request.

If you were feeling super awesome, you could also backport the tests, as we currently have no tests :(

@AD7six
Copy link
Member

AD7six commented Feb 17, 2014

I'm not in a position to merge or comment on this PR - it's been 2 years :'( can anyone verify it's worth cleaning up and merging? Or do we just drop the PR.

@AD7six AD7six added the sqlsrv label Feb 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants