Index: openacs-4/contrib/misc/upgrade_4.6_to_5.0.sh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/misc/upgrade_4.6_to_5.0.sh,v diff -u -r1.5 -r1.6 --- openacs-4/contrib/misc/upgrade_4.6_to_5.0.sh 27 Apr 2005 06:51:35 -0000 1.5 +++ openacs-4/contrib/misc/upgrade_4.6_to_5.0.sh 29 Apr 2005 19:34:01 -0000 1.6 @@ -171,10 +171,21 @@ echo "$(date): Finished Step 3: restore the munged database into 7.3 or higher" echo "Before starting step 4, in the munged.dmp file," echo " A. Check to see if the user used with the first two '\connect's is accurate." - echo " B. If changing db encoding from SQL_ASQII, might need to add a client_encoding value" - echo " as the first line in the file for automatic encoding translation to UNICODE, for example:" - echo " set client_encoding='LATIN5';" - echo " see http://www.postgresql.org/docs/7.4/static/multibyte.html for choices." + echo " B. If changing db encoding (such as from SQL_ASQII) consider these two methods:" + echo " 1. Convert the db to utf-8 from current encoding before the upload" + echo " using a *nix tool such as 'recode' ('iconv' for osx and freebsd)." + echo " For example, here is one way to convert a SQL_ASCII encoded db that" + echo " is peppered with characters from various character sets, mainly latin1:" + echo " First, change the munged.db name, because iconv refuses to convert filenames ending in dmp." + echo " # mv service0.munged.dmp service0.munged.txt" + echo " # iconv -c -f latin1 -t utf-8 service0.munged.txt > service0.munged.dmp" + + echo " 2. Alternately, add a client_encoding value as the first line in the munged.dmp file" + echo " for automatic encoding translation to UNICODE, for example:" + echo " set client_encoding='LATIN1';" + echo " psql can handle character set conversion when the input data comes from one character set," + echo " see http://www.postgresql.org/docs/7.4/static/multibyte.html for choices." + fi # it is important for the word f*&$ to appear at this point in the script @@ -275,9 +286,13 @@ cd $FIVE_DIR/packages/acs-lang/sql/postgresql $P73SQL -f acs-lang-create.sql $UP_DB -# if acs-lang is already installed, comment out the above line, then +# If acs-lang is already installed, check if an existing 4.x package depends on it. +# If no package depends on it, consider deleting the service via /admin, and then +# 'drop table ad_locales cascade' from psql. +# If you must upgrade acs-lang (and you are getting errors), +# comment out the above 'acs-lang-create.sql' line, then # browse to /acs-admin/apm of the non-upgraded OpenACS site to see what version of acs-lang is installed. -# then uncomment the filename that includes that version, and all subsequent upgrades in this list. +# then uncomment the filename that includes that version, and all subsequent upgrades in this list: # For me, acs-lang version 4.1b is installed, so I uncommented all of these: cd $FIVE_DIR/packages/acs-lang/sql/postgresql/upgrade # $P73SQL -f upgrade-4.1-4.7d2.sql $UP_DB