Find centralized, trusted content and collaborate around the technologies you use most. Connect and share knowledge within a single location that is structured and easy to search. I've solved this once, the problem is that the PHP's mssql driver is broken can't find the link to bugs. You'll need to convert the data and queries a little bit:. I read everywhere that you can't, you need to convert to UCS2 first like cypher's solution recommends.
According to this discussion, N character tells the server to convert to Unicode. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 10 years, 4 months ago. I don't know the meaning of the characters I just played around with hex-codes and figured out that they all have a '97' in the middle However on the next read the character is retrieved in UTF-8 again and therefore runs in the storage problem again on the next write In fact this wasn't the issue.
It works with embedded strings as well as with params. But you made me set up a test environment and therefore lead me into right direction:. Now I am feeling bad Try passing these strings as parameters instead of embedding the strings in the SQL statements. Edit Profile.
Sign Out View Profile. Over 2 million developers have joined DZone. Like 0. Join the DZone community and get the full member experience. Join For Free. If you are doing this, there are a few things to keep in mind: Make sure the data you are sending is UTF-8 encoded! This is a no-brainer, but is easy to overlook. Make sure that the source or destination column is of type nchar or nvarchar.
The example also retrieves the newly updated data and displays it. Note that the Comments column is of type nvarchar This is done for demonstration purposes only. In a real application scenario, you would begin with UTF-8 encoded data. All output is written to the browser when the example is run from the browser. For information about storing Unicode data, see Working with Unicode Data. The following example is similar to the first sample but instead of specifying the UTF-8 character set on the connection, this sample shows how to specify the UTF-8 character set on the column.
0コメント