When inserting danish characters to sql server to a field with an nvarchar datatype the danish characters get malformed. Example: brændstof is converted to brændstof. When it is directly from sql server query window it is working correctly. I tried giving different collations to that field(Latin1_Genaral,Danish_Greenlandic_100_CI_AI,Danish_Norwegian_CI_AI etc.) Is there a way to achieve this. I am using Microsoft Drivers 3.0 for PHP for SQL Server. Please help
instead of a literal 'æ', use its CHAR equivalent and see what happens.
I don't now what about Danish letters, but I had problem with Armenian in SQL SERVER. I solved this problem like this.
insert into sometable(field) values( N'myArmenianText' );
I used a work around, just html encoded the danish string before insering into table, and when displaying just decoded back
Just as guess here:
I think the problem is in the PHP part, not in the MySQL part (I read you used some encoding for that field specifically for Danish). Or even earlier. Ever tried to put an 'ä' on an HTML page (the real character, not ä
)? It gets converted to some other chars like the example in your question. So I see two possibilities here:
Or perhaps 3 & 4 (less likely):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With