troubles with PHP setlocale and iso-8859-1 encoding -
i have created website using iso-8859-1 encoding, , want display date in french.
here file use test :
<!doctype html> <html lang="fr"> <head> <meta charset="iso-8859-1"/> </head> <body> <?php setlocale(lc_all, "fr_fr.iso88591"); echo strftime("%a %d %b %y."); ?> </body> </html> when open file : thursday 08 august 2013. instead of jeudi 08 août 2013. (french).
i have tried using utf-8 , works correctly not want...
i have checked language packages installed on server , seems correct :
server$ sudo locale -a c c.utf-8 français french fr_fr fr_fr.iso88591 fr_fr.utf8 posix if have ideas solve problem cool.
edit : typos corrected !
you had typos. change "setlocal" , "8895-1"
<!doctype html> <html lang="fr"> <head> <meta charset="iso-8895-1"/> </head> <body> <?php setlocal(lc_all, "fr_fr.iso88951"); echo strftime("%a %d %b %y."); ?> </body> </html> to "setlocale" , "8859-1", respectively.
<!doctype html> <html lang="fr"> <head> <meta charset="iso-8859-1"/> </head> <body> <?php setlocale(lc_all, "fr_fr.iso88591"); echo strftime("%a %d %b %y."); ?> </body> </html>
Comments
Post a Comment