NogDog wrote:Do you specify UTF-8 as the character set in your HTML head? E.g.:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='sp'>
<head>
<meta http-equiv='Content-Type' content='text/html; [b][COLOR="DarkRed"]charset=UTF-8[/COLOR][/b]'>
If so and you still have the problem, you could try using the utf8_encode() function:
printf("<p>%s</p>\n", utf8_encode($text));
Thanks so much!!!!! That definitely works for my "internationalized" strings, because I'm using a class method to get strings that are defined in other languages, so I just wrap the string in utf8_encode where i return it. However, I'd like to still have utf-8 be my default encoding for things like user input and other strings that I don't have specifically defined in my globalization system. I set the html meta as suggested above, that doesn't work. I set the default_charset in php.ini to utf-8, the AddDefaultCharset was already UTF-8 in httpd.conf, and I even tried setting the mbstring.default_encoding to utf-8 and uncommenting it (all of the mbstring stuff is commented out, I'm assuming this is standard default setting).
What else is there? I checked the phpinfo output for other system variables and saw that iconv had something to do with character encoding, so i tested echoing the string before and after setting all the iconv keys to UTF-8 (using iconv_set_encoding)...that did nothing either.
Any and all help is greatly appreciated.