Solved

Convert charset from Mysql table to utf8

Posted on 2010-11-16
4
402 Views
Last Modified: 2012-06-21
Hi!

Have a table in MYSQL that contains of characters that NOT is UTF8.

How do i in vb.net convert this data to UTF8 ??
0
Comment
Question by:team2005
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 6

Expert Comment

by:Codebot
ID: 34145123
Imports System.Text
 
    ...
 
    Public Function StringAsUtf8Bytes(ByVal strData As String) As Byte()
 
        Dim bytes() As Byte
 
        ' get unicode string as bytes
        bytes = Encoding.UTF8.GetBytes(strData)

        ' return byte data
        Return bytes
 
    End Function
0
 
LVL 2

Author Comment

by:team2005
ID: 34153846
Hi!
'
This give me only valuses like 195,155...

Must convert this to string
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 34153939
0
 
LVL 2

Author Comment

by:team2005
ID: 34154173
Hi!

I wil try to explane what i want
Have this string from a field in mysql:
"MÃ¥ltrostveien 4"  --> Must be converted to UTF8 like : "Måltrostveien 4"

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

631 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question