Skip to content

[5.8] Fix enum definition not producing N-quoted string on Sql Server - #28176

Merged
taylorotwell merged 1 commit into
laravel:5.8from
miklcct:fix_sqlsrv_quote_string
Apr 11, 2019
Merged

[5.8] Fix enum definition not producing N-quoted string on Sql Server#28176
taylorotwell merged 1 commit into
laravel:5.8from
miklcct:fix_sqlsrv_quote_string

Conversation

@miklcct

@miklcct miklcct commented Apr 11, 2019

Copy link
Copy Markdown
Contributor

When I tried to use some Chinese characters in an enum definition in schema builder in Sql Server, the check constraint created was wrong, the Chinese characters turned into ? inside the Sql Server.

The check constraint should be created with the values quoted in N'中文測試' form (note the letter N before the quotation mark).

Reference:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/5d2ea1a2-32e1-4a82-b6e3-17d2b898babc/chinese-characters-issue-with-tsql?forum=transactsql

@driesvints driesvints changed the title fix enum definition not producing N-quoted string on Sql Server [5.8] Fix enum definition not producing N-quoted string on Sql Server Apr 11, 2019
Comment thread tests/Database/DatabaseSqlServerSchemaGrammarTest.php
@taylorotwell
taylorotwell merged commit 176d5d3 into laravel:5.8 Apr 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants