Friday, March 9, 2012

Problems with displaying characters!

Hi there!

I use PHP and MSSQL 2000. Everything works just fine, although I have a small problem which I honestly don't understand. In one of my tables I have a name with either one of the characters , and . (I'm swedish)...When I run a query on that table I get the following results. Let's say the column name is varchar, and the value is "rjan".

"rjan

Why doesn't it display ? Is there something I have to change in MSSQL or in PHP or is it impossible to fix?

Thankx in advance! ;)Hi there!
I use PHP and MSSQL 2000. Everything works just fine, although I have a small problem which I honestly don't understand. In one of my tables I have a name with either one of the characters , and . (I'm swedish)...When I run a query on that table I get the following results. Let's say the column name is varchar, and the value is "rjan".
"rjan
Why doesn't it display ? Is there something I have to change in MSSQL or in PHP or is it impossible to fix?
Thankx in advance! ;)

-- I would be surprised if it is impossible to fix. (I don't have an immediate answer though.)
-- You may be seeing some kind of collation precedence
-- rule issue. There are different implict conversions
-- that take place (or not) depending on the column collations and the operators involved
-- If you are not using it already, you may wish to look into using the
-- collation clause to specify conversions and see if doing so will ultimately address your issues.

SELECT *
FROM Authors
WHERE au_lname = 'White' COLLATE Finnish_Swedish_CI_AI

-- this will give a list of collations that involve swedish
SELECT *
FROM
::fn_helpcollations()
Where
Name like '%swed%'
Or
description Like '%swed%'

No comments:

Post a Comment