Reputation: 3623
I'm using the Pervasive SQL - ADO.NET 3.5 DataProvider for retrieving data out of the PSQL DB and I've noticed that the german umlauts (äöüÄÖÜ etc.) are not represented correctly in the PSQLDataReader
, but in the Pervasive Control Center (similar to the sql management studio) the umlauts are all correct.
Is there anything similar to the TSQL "SET LANGUAGE"
-command? I havn't found something like that for Pervasive SQL.
Googling this issue wasn't successful at all, too. Although I did find some tips with a file called upper.alt or collate.cfg, but don't know how to use this files and I coudn`t find them in my installation. (I'm totally new to Pervasive...)
I hope that someone on here could help me with that.
Thanks in advance
--EDIT
I sovled it in code, like so:
var ort = reader["Ort"].ToString().Trim();
var bytes = Encoding.Default.GetBytes(ort);
ort = Encoding.GetEncoding(850).GetString(bytes);
Upvotes: 2
Views: 882
Reputation: 9192
Does your Database have an alternate Code Page set in the PCC? If so, you'll probably need to specify an "Encoding=" on the ADO.NET connection string.
Upvotes: 2