Open
Conversation
…t to nvarchar(3000). Changed value function to return N'$data' if it is a string.
…be NULL. This is to put the code the back to the same as mssql.
…suggested by @FinchPowers in this [issue](revathskumar/CakePHP-sqlsrv-driver#2).
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 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 :( |
Member
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.