PDA

View Full Version : Different character encoding on different servers?



gandalf117
04 Dec 2012, 05:07 AM
This problem has been bothering me for a long long time and I haven't found a solution yet.

Needless to say I am not an expert on database character encoding and this could be something very basic for those who know what is going on.

Here is the problem:

When I submit foreign text through an ordinary webform to my local server (XAMPP) the text is encoded in a certain way before it is stored in the local database. For example if I submit the following word (it is in Cyrillic): едно after it is encoded in the database it shows as: едно Of course when I retrieve the text from the database in browser it's automatically decoded back to normal and it shows normally.

However when I submit foreign text through the same webform but to servers on the web the same text is encoded in a totally different way before it is stored in the database on those servers. For example that same word (it is in Cyrillic): едно after it is encoded in the database it shows as: едно This also shows normally back in the browser but only on their servers. God forbid I transfer the same encoded information to my local server.

Now I don't understand how and why the same word is encoded in two totally different ways: едно and едно. The problem is that because of this difference I cannot transfer information in foreign language from my server to other servers and vice versa. When I import information from one server to the other the other is just failing to decode the text and is showing the encoded version in the browser. I think it has to do with how those servers and my server are configured. Not all servers are like that by the way. There are plenty of servers where this problem doesn't exist. I think go-daddy is one of them.

Any help with this problem is greatly appreciated.
Please, help me figure this out!