Jump to content

Maybe useful to check in installroutine of PW the PHP-default_charset ?


horst
 Share

Recommended Posts

Hi,

I have had some (more) trouble to get started with PW  :-(

In my php.ini the default_charset was set to 'ISO-88591' or something similar.

So, as the DB uses utf8 and the pages are delivered in utf8, php is required to use it too.

If not you can run into errors when try to save strings with e.g. german umlaute: äöü ÄÖÜ

     Incorrect string value: '\xFCchte ...' for column 'data' at row 1

I'm not sure if this was checked with the install routine, but I have seen only green lines :-)

Maybe this could be done to avoid some hassle to users with a setup other than utf8.

Or it maybe an option to add "ini_set('default_charset','utf8');" somewhere at the top of index.php,

and to be very very sure (also for paranoics like me :-) ) one can set and check it:

    ini_set('default_charset','utf8');
    $php_use_utf8 = strtolower(trim(ini_get('default_charset')))=='utf8' ? true :  false;
 

Ok, now I can start try out that wonderful CMS :-)

  • Like 2
Link to comment
Share on other sites

I deal with servers set for iso-8859-1 quite regularly, and have never had an issue. PHP isn't exactly UTF-8 native, so we basically treat everything as if it were UTF-8 even if PHP doesn't. But there must be some instances where it does matter, as you've found. I will add the init_set('default_charset', 'utf8') to our initialization. Thanks for pointing this out. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...