SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Issues with encoding after migrating from SQL Server 2005 to 2008


Issues with encoding after migrating from SQL Server 2005 to 2008

Author
Message
Soul_bahamut
Soul_bahamut
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 6
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.
Sue_H
Sue_H
SSC Guru
SSC Guru (72K reputation)SSC Guru (72K reputation)SSC Guru (72K reputation)SSC Guru (72K reputation)SSC Guru (72K reputation)SSC Guru (72K reputation)SSC Guru (72K reputation)SSC Guru (72K reputation)

Group: General Forum Members
Points: 72638 Visits: 14935
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



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search