From: Reini U. <ru...@x-...> - 2004-03-29 20:25:17
|
Jeff McKenna schrieb: > i guess what i'm asking is: should my 'postgres' user (who starts > postmaster and creates the DB) be using something other than 'UTF-8' so > I can make these work easily? Should I be changing that user to > something else for its locale ? Not needed. The users locale on initialization can be overridden by /usr/local/pgsql/bin/initdb --locale=C -D /usr/local/pgsql/data createdb doesn't set the db locale, only initdb try a fresh initdb on another location with --locale=C or en_US without UTF-8. I don't have linux php debugging machine right now to test utf-8 issues. japanese (which uses utf-8) works fine on windows and cygwin postgres though. so it looks like a linux issue. > Jeff McKenna wrote: > >> also note that I 'dropdb' and 'createdb' each time for these tests. I >> re-run /schemas/psql.sql and refresh my browser page, causing the >> 'virgin wiki' to load (with no errors)...refresh that page shows front >> page..then if i click on any link on the wiki a new page is returned >> with the php error below. >> Jeff McKenna wrote: >>> Yes i did try that. I tried the following: >>> >>> define('CHARSET', 'UTF-8'); ---> same php error >>> define('CHARSET', 'UNICODE'); ---> same php error >>> define('CHARSET', 'en_US.UTF-8'); ---> same php error >>> define('CHARSET', 'iso-8859-1'); ---> same php error >>> define('CHARSET', 'LATIN1'); ---> same php error >>> >>> Reini Urban wrote: >>>> Jeff McKenna schrieb: >>>>> Can someone please help me...should the user that starts postmaster >>>>> be using locale C ? Is this the source of my php 'unexpected >>>>> character' error message below???? >>>> >>>> >>>> No, the database should be defined to be PhpWiki charset compatible. >>>> At least I would try, because you are using a UTF-8 postgres. >>>> On the other side you could just try UTF-8 as CHARSET. >>>> >>>> See index.php for define('CHARSET') >>>> >>>> >>>>> Jeff McKenna wrote: >>>>> >>>>>> Thanks for looking into this. My guess is that it has something >>>>>> to do with my 'locale' configuration. I noticed the exact same >>>>>> error was reported on the phpwiki FAQ (but not solved). I execute >>>>>> postmaster with a 'postgres' user and that user's 'locale' is: >>>>>> >>>>>> [postgres@gcrc-serv-03 jeff]$ locale >>>>>> LANG=en_US.UTF-8 >>>>>> LC_CTYPE="en_US.UTF-8" >>>>>> LC_NUMERIC="en_US.UTF-8" >>>>>> LC_TIME="en_US.UTF-8" >>>>>> LC_COLLATE="en_US.UTF-8" >>>>>> LC_MONETARY="en_US.UTF-8" >>>>>> LC_MESSAGES="en_US.UTF-8" >>>>>> LC_PAPER="en_US.UTF-8" >>>>>> LC_NAME="en_US.UTF-8" >>>>>> LC_ADDRESS="en_US.UTF-8" >>>>>> LC_TELEPHONE="en_US.UTF-8" >>>>>> LC_MEASUREMENT="en_US.UTF-8" >>>>>> LC_IDENTIFICATION="en_US.UTF-8" >>>>>> LC_ALL= >>>>>> >>>>>> My question is: what should i specify in index.php for >>>>>> 'CHARSET'???? Do u think this is causing the problem? You >>>>>> mentioned that '--locale C' is only available...how do i change >>>>>> that for the postgres user? (I'm running linux redhat 9) >>>>>> Please help (postgres/linux newbie) -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |