Link to home
Start Free TrialLog in
Avatar of hankknight
hankknightFlag for Canada

asked on

PHP: Get text content scrambled by UTF-8

Somehow the data in a MySQL database ended up in a format that looks like this.

Using PHP, is there any way I can get the actual text from this?

I tried using mb_convert_encoding() and I also tried using utf8_decode() but I cannot figure out how to get actual text content from this:

"0S"0h"0o"0r"0t"0l"0i"0s"0t"0e"0d"0 "0f"0o"0r"0 "0t"0h"0e"0 "02"00"01"01"0 "0F"0r"0a"0n"0k"0 "0O "0C"0o"0n"0n"0o"0r"0 "0S"0h"0o"0r"0t"0 "0S"0t"0o"0r"0y"0 "0A"0w"0a"0r"0d"0,"0 "0t"0h"0e"0 "0w"0o"0r"0l"0d"0'"0s"0 "0r"0i"0c"0h"0e"0s"0t"0 "0s"0h"0o"0r"0t"0 "0s"0t"0o"0r"0y"0 "0p"0r"0i"0z"0e"0 "0 "0 "0 "0""0T"0r"0a"0f"0f"0o"0r"0d"0'"0s"0 "0a"0l"0c"0h"0e"0m"0i"0c"0a"0l"0 "0m"0i"0x"0i"0n"0g"0 "0o"0f"0 "0r"0e"0s"0e"0a"0r"0c"0h"0,"0 "0f"0a"0b"0l"0e"0,"0 "0p"0a"0t"0h"0o"0s"0,"0 "0a"0n"0d"0 "0p"0l"0o"0t"0 "0y"0i"0e"0l"0d"0s"0 "0i"0m"0p"0r"0e"0s"0s"0i"0v"0e"0 "0r"0e"0s"0u"0l"0t"0s"0."0""0-"0R"0a"0i"0n"0 "0T"0a"0x"0i"0 "0 "0 "0 "0""0I"0 "0l"0o"0v"0e"0 "0M"0a"0t"0h"0e"0w"0 "0J"0."0 "0T"0r"0a"0f"0f"0o"0r"0d"0'"0s"0 "0i"0m"0a"0g"0i"0n"0a"0t"0i"0o"0n"0!"0 "0I"0n"0 "0h"0i"0s"0 "0w"0o"0r"0l"0d"0,"0 "0s"0c"0i"0e"0n"0t"0i"0s"0t"0s"0 "0c"0l"0o"0n"0e"0 "0J"0e"0s"0u"0s"0 "0C"0h"0r"0i"0s"0t"0,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"0b"0u"0t"0 "0t"0h"0e"0 "0e"0l"0e"0v"0a"0t"0o"0r"0 "0t"0a"0k"0e"0s"0 "0y"0o"0u"0 "0t"0o"0 "0a"0n"0o"0t"0h"0e"0r"0 "0f"0l"0o"0o"0r"0 "0a"0l"0t"0o"0g"0e"0t"0h"0e"0r"0,"0 "0a"0n"0d"0 "0i"0t"0 "0t"0u"0r"0n"0s"0 "0o"0u"0t"0 "0t"0o"0 "0b"0e"0 "0a"0 "0t"0h"0o"0r"0o"0u"0g"0h"0l"0y"0 "0e"0n"0j"0o"0y"0a"0b"0l"0e"0 "0r"0i"0d"0e &"0 "0a"0 "0m"0u"0s"0t"0 "0f"0o"0r"0 "0r"0e"0a"0d"0e"0r"0s"0 "0l"0o"0o"0k"0i"0n"0g"0 "0f"0o"0r"0 "0s"0o"0m"0e"0t"0h"0i"0n"0g"0 "0f"0r"0e"0s"0h"0 "0a"0m"0i"0d"0 "0a"0 "0s"0e"0a"0 "0o"0f"0 "0s"0t"0a"0l"0e"0 "0b"0o"0o"0k"0s"0.  "0Q"0u"0i"0l"0l"0 "0a"0n"0d"0 "0Q"0u"0i"0r"0e"0 "0

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hankknight

ASKER

Thanks, Ray, that was very helpful!
Thanks for the points -- best of luck with it, ~Ray
Avatar of jjmelo
jjmelo

Hello,

Ai need of function

$str = <<<STR
"0S"0h"0
STR;

change:

$str = <<<STR
.$var.
STR;

erro...
@jjmelo:  Consider posting a question of your own here!  We are glad to help!