php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32372 strftime doesn't support UTF-8 for Greek locale
Submitted: 2005-03-19 10:17 UTC Modified: 2005-03-19 16:32 UTC
From: contact at zefxis dot gr Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.0.3 OS: Windows XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: contact at zefxis dot gr
New email:
PHP Version: OS:

 

 [2005-03-19 10:17 UTC] contact at zefxis dot gr
Description:
------------
The code below should display today's day and month in the Greek locale.

All I get is a bunch of "?" for each letter of the words. If I remove the UTF-8 header I get the proper Greek words.



Reproduce code:
---------------
<?php

header('Content-Type: text/html; charset=UTF-8');
setlocale (LC_TIME, 'gr');
echo strftime("%A %B");

?>

Expected result:
----------------
??????? ???????

Actual result:
--------------
??????? ???????

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-19 14:41 UTC] derick@php.net
No bug, you need to set the greek UTF8 locale:

gr.UTF-8
 [2005-03-19 15:20 UTC] contact at zefxis dot gr
The following returns "Saturday March". In other words there's no locale by the value of 'gr.UTF-8' on Windows XP (also tried 'el_GR.UTF-8'). Maybe it only exists on *nix systems.

<?php

header('Content-Type: text/html; charset=UTF-8');
setlocale (LC_TIME, 'gr.UTF-8');
echo strftime("%A %B");

?>
 [2005-03-19 16:32 UTC] sniper@php.net
That's not PHP's fault.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 16 16:08:09 2025 UTC