UTF 8 Encoding in ADO.NET

G

Guest

Hello

we are into internationzation our App. we are facing one issue : right now, VB.NET is communicating to the ODBC driver (Teradata) in utf16 encoding. but the odbc driver can handle only utf-8 encdoing , not the utf-16. we tried to use th
utf-8 encoding function to convert the utf8 to utf16 which is not useful in this case because it stores the data in byte array.
Is there is any specificed functions through i can set the Globally the Odbbc communcation to UTF8? please let me if you anybody has faced this issue or anyworkaround

thanks
paul
 
M

M Berry

Hi Paul,

I had similar problems in VB6 ASP SQL server. look on MSDN for articles
relating to character encoding.
Here is what I learned. VB6 stores strings as and I believe VB.net as
UTF-16. sqlserver stores data in a UCS format. Make sure you know what
your DB stores it as not just the OBDC driver connection. when I loading my
SQL database via an access linked table my DSN had the flag convert
character data. This caused me problems. make sure you know exactly what
encoding your data is in the database. Make sure you set the
Response.ContentEncoding to exactly what you what.
see :

http://msdn.microsoft.com/library/d...us/cpguide/html/cpconusingunicodeencoding.asp

Once I had this all resolved. I had some clown save my XML files as ANSI in
notepad while the encoding was UTF-8 in the file. That caused another set
of problems. Hope that was helpful
Regards
Matt


Paulraj thomas said:
Hello,

we are into internationzation our App. we are facing one issue : right
now, VB.NET is communicating to the ODBC driver (Teradata) in utf16
encoding. but the odbc driver can handle only utf-8 encdoing , not the
utf-16. we tried to use the
utf-8 encoding function to convert the utf8 to utf16 which is not useful
in this case because it stores the data in byte array.
Is there is any specificed functions through i can set the Globally the
Odbbc communcation to UTF8? please let me if you anybody has faced this
issue or anyworkaround.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top