Groups | Blog | Home
all groups > dotnet ado.net > december 2003 >

dotnet ado.net : Encoding problem


Calvin Lai
12/31/2003 9:28:31 PM
If my data in SQL server was stored from a web application with
requestEncoding set as iso8859-1. And now I want to change the data encoding
to big5, (or anything else), how could I do that? Thanks for all advice and
input.

Calvin

Miha Markic
1/1/2004 3:41:26 PM
Hi Calvin,

Try something like this:

Dim big5encoding As New Encoding.GetEncoding("big5")
oTempBuffer = Encoding.Convert(Encoding.GetEncoding(28591),
big5encoding , iso88591stringBytes) ' iso88591string is an array of bytes
Dim big5string = big5encoding .GetString(oTempBuffer)

--
Miha Markic - RightHand .NET consulting & development
miha at rthand com
www.rhand.com

[quoted text, click to view]

AddThis Social Bookmark Button