Page 1 of 1

Site encoding 1251

Posted: Sat 9. Oct 2021, 21:22
by singletone
Good afternoon!
There is an old site with charset=windows-1251.

I add a .htaccess entry:
AddDefaultCharset WINDOWS-1251
Nothing changes. The encoding remains UTF-8
I add php_value default_charset cp1251 - server error 500
Please help me.
Thanks!
P.S.
After
php_value default_charset cp1251
in logs:
Invalid command 'PHP_VALUE', perhaps misspelled or defined by a module not included in the server configuration

Re: Site encoding 1251

Posted: Sun 10. Oct 2021, 07:24
by Tobi
Just try

Code: Select all


default_charset = “cp1251“

There is no need for the word „php_value“.

Re: Site encoding 1251

Posted: Sun 10. Oct 2021, 07:28
by singletone
Hi!
Tnx, but it doesn't work:
log:
.htaccess: Invalid command 'default_charset', perhaps misspelled or defined by a module not included in the server configuration

Re: Site encoding 1251

Posted: Tue 12. Oct 2021, 12:12
by singletone
I added the line
default_charset = "windows-1251"
to the settings
"Additional PHP settings" in "Edit user".

Everything worked.