views:

346

answers:

1

I have one page and it's encoding is UTF-8 and If i try to run that code in unix system everythings looks fine but when i try to run in windows(7) some chracters looks question mark(�). How can run the code fine both of two system(without using iconv).

header('Content-Type: text/html; charset=UTF-8');
setlocale(LC_ALL, 'turkish');
echo strftime("%d %B %Y, %H:%M");
+5  A: 

Microsoft Windows does not support UTF-8 locales. So if you provide turkish locale, it would pic an 8-bit code page that allows representation of specific language.

For example for locale Hebrew it would pic codepage-1255, for Turkish it would probably be 1254.

So, you can't use this under MS-Windows platform.

How can run the code fine both of two system(without using iconv).

Probably use non-utf8 encoding under MS Windows.

Artyom