krang_charset_convert_data - convert the character set of krang data.
NOTE: It is important to back up your data before running this script. If used incorrectly ic royally screw up your data. Please, please, please back up before using this.
krang_charset_convert_data --from ISO8859-1 --to UTF-8
This script will convert your data in the Krang database from one character set to another. This is useful if you've been running Krang for a while and your site needs to change its character set.
NOTE: If your tables aren't already in the --to format,
<bin/krang_charset_convert_tables> must be run AFTER this script.
Either way, the charset directive in krang.conf should not be changed
to the --to format until both your data and tables are updated.
The script takes the following options:
Specify the character set your data is already in. If you never set
Krang to use a particular character set, chances are you are using
either an ISO-8859 version or windows-1252. You can also look
to see if the site being served declares its character set.
When in doubt, you'll probably have to guess and try one. Make sure to backup so you can roll it back if your guess was wrong.
Specify the character set that you are converting your data to.
By default this will just run for all of the tables in the given
instance (as set in $ENV{KRANG_INSTANCE}). But you can optionally
tell it to run for every instance installed.
By default this will run for all of the sites in the give instance
instance (as set in $ENV{KRANG_INSTANCE}). But you can optionally
tell it to run for just a specific site. This option can be specified
multiple times.
By default this will run for all tables and all stories, but you can optionally tell it to run only for a specific story (and no non-story data). This can be specified multiple times.
This parameter (which is mutually exclusive with --only-story-id) will convert all tables and all stories except the given one. This can be specified multiple times.
This is a mode in which actions will be displayed but not performed.
Show more information about what is being converted.
Krang supports any character encoding set that is listed by Perl's built-in Encode::Supported. If you need other encodings than Perl provides by default, you can install other Perl encoding modules on your system.