I've got a script that will get a string in the database, splits it into words and creates what towards the database. It really works perfectly after i call the script via http (using apache web server). Additionally, it activly works to run it from the home windows command line. However, after i attempt to run it in the command line (spend) in ubuntu all swedish chars ÅÄÖ is changed with AAO within the database. Very strange.
What's apache telling php that i have to tell it myself when running from command line?
MySQL has various parameters coping with client encoding. Setting the customer character set with the idea to UTF-8 in order to the database's character set should solve your condition.
You can put phpinfo() towards the top of your script, to print all of your atmosphere variables, configuration configurations, etc. Compare the output when running in the command line versus running under apache.
Most likely ubuntu doesn't accept Terminal that type of stuff. Attempt to use a addon approximately?
It is not really strange cause just about all command line stuff possess some issues with some kind of special chars. Are you certain you actually need that? Can there be not some other method to write it? I have no idea cause i am not swedish.
Apache and PHP simply have support for your type of chars,,, there's absolutely nothing to say else
Frequently you will see another
php.ini file that will get used when run through the command line. Determine for those who have one, and exactly what the variations are.