Page 1 of 1

Charset problem with dates string

Posted: Sun May 04, 2008 12:52 pm
by JWalker
Hello,

I moved my blog from my old machine to a new one and a problem arose. In the frontpage and in article's page, the string indicating the date (i.e. Thursday, 01 May 2008) is shown as ??????, 01 ??? 2008. Also, this problem occurs in the calendar sidebar plugin. My blog is in Bulgarian, Cyrillic and uses cp1251, not UTF-8. On the old machine all was OK, I made SQL dump and imported the SQL file into the database of the new machine.

My configuratrion is:

(old machine) Apache 2.0.61 (Win32)/DAV/2 SVN/1.4.6 PHP 5.2.4 MySQL 5.0.45-community-nt Serendipity 1.3
(new machine) Apache 2.0.63 (Win32)/DAV/2 SVN/1.4.6 PHP 5.2.5 MySQL 5.0.51b-community-nt Serendipity 1.3

The new machine has the same name as the old one and the same IP address (the old one is turned off), so I didn't have to change anything in serendipity_config table.

I suppose that the issue is maybe outside S9Y, maybe in PHP/MySQL/Apache configuration but I compared the configuration files and didn't find anything suspicious. So, could you give some directions where to search for the problem?

Re: Charset problem with dates string

Posted: Sun May 04, 2008 8:11 pm
by garvinhicking
Hi!

The dates are emitted using the "locale" system. It seems your new server is missing the locale for cp1251. It seems you use a windows installation; have you changed the OS? Have you missed any additional language packs?

Is the new blog online somewhere? It could also be that your new installation has different charset configuration than the old one, forcing the system to use a different locale than before?

Regards,
Garvin

Posted: Mon May 05, 2008 11:01 pm
by JWalker
Hi,

The new and the old machines are Windows XP. I copied serendipity directories to the new machine and so I did with database (SQL export and import). But this is not related to MySQL, I suppose it is Apache/PHP/Win XP issue. BTW, all other Cyrillic texts are visible and can be read. Also,

1) I compared Regional and Language Options - they were the same (Bulgarian).
2) In php.ini I have "default_charset = "windows-1251" " on both machines.
3) Tried with "cp1251" instead of "windows-1251" with no success.

Posted: Tue May 06, 2008 10:52 am
by garvinhicking
Hi!

Is the old machine still avaialble? Can you check the HTTP headers of both servers? Maybe one of them is using a different Content-Type?

Regards,
Garvin

Posted: Thu May 08, 2008 9:42 pm
by JWalker
Here is

Code: Select all

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
This is from the 'bad' machine (using PHP 5.2.6.). Is there some some simple script (something using date functions may be) that would prove/demonstrate/locate the problem?
Also, in the configuration dialog of Calendar plugin, the drop-down list box for 'first day of week' shows ????? ???? instead of days' names.

Also: this message appeared when saving configuration:
ERROR_XSRF:Your browser did not sent a valid HTTP-Referrer string. This may have either been caused by a misconfigured browser/proxy or by a Cross Site Request Forgery (XSRF) aimed at you. The action you requested could not be completed. I have never seen this before.

Posted: Thu May 08, 2008 11:34 pm
by Don Chambers
See if this thread helps you: http://board.s9y.org/viewtopic.php?t=4755

Posted: Thu May 08, 2008 11:41 pm
by JWalker
Thanks, what about ERROR_XSRF, I had set not existing temp dir in php.ini while I tried to resolve my ????? problem. After I have set proper values for
upload_tmp_dir="C:\temp\php"
session.save_path="C:\temp\php"

ERROR_XSRF disappeared.

Posted: Fri May 09, 2008 3:20 am
by Don Chambers
I wish I knew - but I do not. I simply saw a post that might help, so I offered the link. Hopefully, someone who has resolved the same issue, or at least knows how to further assist, will step in and provide guidance.

Posted: Fri May 09, 2008 11:25 am
by garvinhicking
Hi!

Is the bad server availalbe in internet? Then I could see for some stuff.

I could create a simple PHP date script, but ATM I'm having a flu,, so it would need to wait til next week?

Regards,
Garvin

Posted: Fri May 09, 2008 12:19 pm
by JWalker
No, it isn't in internet. It is a blog that I use in our company to 'blog' my personal activities at work and it is not so important thing to worry too much. I suppose it is something PHP related. I'll play with PHP.ini and may be some solution will arise. Thanks for the assistance and I wish you good health soon.