Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Convert charset from Mysql table to utf8

Posted on 2010-11-16
4
Medium Priority
?
419 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
  • 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 2000 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

Industry Leaders: 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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

879 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