{"action":"opened","issue":{"url":"https://api.github.com/repos/Azure/msphpsql/issues/92","repository_url":"https://api.github.com/repos/Azure/msphpsql","labels_url":"https://api.github.com/repos/Azure/msphpsql/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/Azure/msphpsql/issues/92/comments","events_url":"https://api.github.com/repos/Azure/msphpsql/issues/92/events","html_url":"https://github.com/Azure/msphpsql/issues/92","id":153647849,"number":92,"title":"Using emulate prepares breaks string parameters that contain unicode characters","user":{"login":"david-garcia-garcia","id":9599352,"avatar_url":"https://avatars.githubusercontent.com/u/9599352?v=3","gravatar_id":"","url":"https://api.github.com/users/david-garcia-garcia","html_url":"https://github.com/david-garcia-garcia","followers_url":"https://api.github.com/users/david-garcia-garcia/followers","following_url":"https://api.github.com/users/david-garcia-garcia/following{/other_user}","gists_url":"https://api.github.com/users/david-garcia-garcia/gists{/gist_id}","starred_url":"https://api.github.com/users/david-garcia-garcia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-garcia-garcia/subscriptions","organizations_url":"https://api.github.com/users/david-garcia-garcia/orgs","repos_url":"https://api.github.com/users/david-garcia-garcia/repos","events_url":"https://api.github.com/users/david-garcia-garcia/events{/privacy}","received_events_url":"https://api.github.com/users/david-garcia-garcia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-08T10:16:22Z","updated_at":"2016-05-08T10:16:22Z","closed_at":null,"body":"Someone reported this bug here:\r\n\r\nhttps://www.drupal.org/node/2693763\r\n\r\nThe issue is that a statement without EMULATE_PREPARES generates the following SQL:\r\n\r\n`SELECT * FROM users WHERE name = @P1 AND status = 1',N'@P1 nvarchar(6)',N'가각'`\r\n\r\nBut when using EMULATE_PREPARES it turns it into:\r\n\r\n`SELECT * FROM users WHERE name = '가각' AND status = 1`\r\n\r\nWhen it should be (notice the additional N):\r\n\r\n`SELECT * FROM users WHERE name = N'가각' AND status = 1`\r\n\r\nThere is another issue related to EMULATE_PREPARES not working as expected:\r\n\r\nhttps://github.com/Azure/msphpsql/issues/63\r\n\r\n"}}