I'm using a very old software written probably in VB6 which is discontinued since years. This software is using SQL Server 2005 database. My goal was to use this database inside my PHP application.
The problem is characters encoding. Database's encoding is Polish_CI_AS
according to Microsoft SQL Server Management Studio. This could be either WINDOWS-1250
or CP1250
or ISO-8859-2
according to my understanding. The rows are nvarchar
type
Now this is what I see when I use SQL Server Management Studio
This is obviously broken, it should be:
Nom: Markowska -Kwestionariusz(+)
Prenom: Magdalena
Tel3: I don't want to post it but numbers are mixed up in the DB
However this VB6 software displays those values properly and that is biggest mystery to me here. It's weird that NATIVE SQL Server Management Studio displays it incorrectly in first place. In PHP I tried to use iconv()
to convert it to UTF-8
but without success. I tried those 3 character encoding types mentioned above, result was the same. I am connecting using PDO+ODBC, tried all 3 encoding methods. All failed.
Did anyone experience anything similar or perhaps this mystery glyph []
at the beginning of each row's value looks similar? Also that whitespace
replaced with currency character ¤
and all this followed by wrong characters order?
Thanks in advance for any tips and suggestions :)