Charset problem with dates string

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
JWalker
Regular
Posts: 177
Joined: Mon Sep 12, 2005 4:14 pm
Location: Botevgrad, Bulgaria
Contact:

Charset problem with dates string

Post 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?
Ivan Cenov
OKTO-7 Co., Botevgrad
Bulgaria
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Charset problem with dates string

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
JWalker
Regular
Posts: 177
Joined: Mon Sep 12, 2005 4:14 pm
Location: Botevgrad, Bulgaria
Contact:

Post 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.
Ivan Cenov
OKTO-7 Co., Botevgrad
Bulgaria
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
JWalker
Regular
Posts: 177
Joined: Mon Sep 12, 2005 4:14 pm
Location: Botevgrad, Bulgaria
Contact:

Post 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.
Ivan Cenov
OKTO-7 Co., Botevgrad
Bulgaria
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

See if this thread helps you: http://board.s9y.org/viewtopic.php?t=4755
=Don=
JWalker
Regular
Posts: 177
Joined: Mon Sep 12, 2005 4:14 pm
Location: Botevgrad, Bulgaria
Contact:

Post 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.
Ivan Cenov
OKTO-7 Co., Botevgrad
Bulgaria
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post 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.
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
JWalker
Regular
Posts: 177
Joined: Mon Sep 12, 2005 4:14 pm
Location: Botevgrad, Bulgaria
Contact:

Post 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.
Ivan Cenov
OKTO-7 Co., Botevgrad
Bulgaria
Post Reply