Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Convert charset from Mysql table to utf8

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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

730 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