How can I specify the character encoding to be used by OLEDB when querying a DBF?
Posted
by Manga Lee
on Stack Overflow
See other posts from Stack Overflow
or by Manga Lee
Published on 2009-09-25T06:58:45Z
Indexed on
2010/04/11
13:03 UTC
Read the original article
Hit count: 379
Is it possible to specify which character encoding should be used by OLEDB when querying a DBF file?
A possible work-around would be to encode the query string before the OLEDB call to the DBF file's character encoding and then encode all the results when they are returned. This will work but it would be nice if OLEDB or possibly ADO.NET could do this for me.
UPDATE
The suggestion by Viktor Jevdokimov does not seem to work automatically. But it made me investigate manual conversion of the strings. It is possible to use the TextInfo property of CultureInfo to find out the OemCodePage and the WindowsCodePage and use those to get the corresponding Encoding instances to perform manual conversion. But I can not get ADO.NET use these encondings to perform the conversion for me.
© Stack Overflow or respective owner