You must to uniform all charset between (browsers , serverside , Programming language and DB Engine)
The best solution to solve this is to use utf-8 unicode charset in all of the above sources.
long time back I shifted to utf-8 , and most of the scripts (Java, Javascript, Ajax, PHP, etc) works for me without any problem.
hope this help.