0

I created a sql table with a field in "latin_swedish_ci" and downloaded a lot of data in this field. But a lot of special foreign characters have automatically converted in something very difficult to use.

For example I have those east-europe characters :

ō
ą
ł
š

Problem is those characters are part of a url and .net does not automatically convert into "real characters". For example when I use with webclient the real url isn't reached.

Is there a way to directly convert those characters code into the real characters in the db. Or at least a way to turn them for use in the webclient DownloadString function ?

Jsman
  • 13
  • 2
  • You need to convert those characters in utf8_general_ci. You can either sort out the problem once forever retrieving all the values and converting/restoring them or you can convert them when you need to use the values. Have a look also at the answer given in this post http://stackoverflow.com/questions/18159266/retrieve-content-from-latin-swedish-ci-and-store-it-into-utf8-general-ci – FeliceM Sep 21 '13 at 13:50
  • @FeliceM Yep I've discovered that I should put my characters in utf8, but I can't find a Mysql Line to convert them. It seems it convert `ō` in five distincts utf8 characters instead of giving back the symbol. – Jsman Sep 21 '13 at 17:13
  • 1
    Those codes looks like special html characters. Have a look here and check if you get the right character out of the code. If so at the bottom of the post there are some hint about how to use code for conversion. http://www.web2generators.com/html/entities – FeliceM Sep 21 '13 at 22:05
  • It works, you're my hero !! Indeed the data itself was from a webpage which explains those character in my DB. In the future I'll do everything in UTF8 with those functions directly from the beginning... Have a nice day! – Jsman Sep 21 '13 at 23:07

1 Answers1

1

Those codes looks like special html characters. Have a look here and check if you get the right character out of the code. If so at the bottom of the post there are some hint about how to use code for conversion. You can also look at these SO answers to get some more examples: Answer 1 Answer 2

Community
  • 1
  • 1
FeliceM
  • 4,163
  • 9
  • 48
  • 75