Issues with encoding after migrating from SQL Server 2005 to 2008

  • Hello,

    We've had a PHP app running on a SQL Server 2005 database for years but due to an emergency we had to migrate to a new server which runs SQL Server 2008. Since the databases were restored the collations are the same (Modern_Spanish_CI_AS), I've compared settings and everything and there're no differences whatsoever between the old SQL Server and the new one yet absolutely all strings with spanish characters (ie ñ, á, é, etc.) cause our json reliant operations to fail because more than likely, the information is returned differently and thus by not being encoded in utf8 json_encode returns an empty string.

    However, in SQL Server 2005 this wasn't an issue, the strings were returned in a way that didn't require the encoding, so I'm trying to figure out if there's something I didn't know that I've yet to set up because fixing this issue across the board is more or less a monolithic task.

    Any kind of help or pointers will be greatly appreciated.

  • Soul_bahamut - Wednesday, December 20, 2017 8:47 PM

    Hello,

    We've had a PHP app running on a SQL Server 2005 database for years but due to an emergency we had to migrate to a new server which runs SQL Server 2008. Since the databases were restored the collations are the same (Modern_Spanish_CI_AS), I've compared settings and everything and there're no differences whatsoever between the old SQL Server and the new one yet absolutely all strings with spanish characters (ie ñ, á, é, etc.) cause our json reliant operations to fail because more than likely, the information is returned differently and thus by not being encoded in utf8 json_encode returns an empty string.

    However, in SQL Server 2005 this wasn't an issue, the strings were returned in a way that didn't require the encoding, so I'm trying to figure out if there's something I didn't know that I've yet to set up because fixing this issue across the board is more or less a monolithic task.

    Any kind of help or pointers will be greatly appreciated.

    You might want to also look at the connection from PHP - that could also be the issue. You may need to specify a character set in your connection string.

    Sue

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply