BLACKISH DEV BLOG Support
 

 

Unity: Get Umlauts via WWW from PHP

I do this all the time: Call a PHP page with WWW to get some data from a Database. Now whenever I tried to return characters that were not a part of the ASCII printable characters, I’d get ?? questionmarks in Unity.

The trick is to make sure the text is properly encoded before you echo it!

echo “ÄäÜüÖö”; //does not work :(
echo mb_convert_encoding(“ÄäÜüÖö”, ‘UTF-8′); //works!

More info on the PHP help pages

Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>