datasources icon indicating copy to clipboard operation
datasources copied to clipboard

sqlsrv UTF-8 changes

Open ianchanning opened this issue 13 years ago • 2 comments

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.

ianchanning avatar Oct 12 '11 13:10 ianchanning

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 :(

predominant avatar Nov 05 '11 13:11 predominant

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 avatar Feb 17 '14 09:02 AD7six