[TYPO3-english] Indexed search and UTF-8

Jigal van Hemert jigal at xs4all.nl
Tue May 24 18:13:19 CEST 2011


Hi,

On 24-5-2011 17:52, Jan Loderhose wrote:
> according to your explanation you have a quite complex situation of
> wrong encoded special characters of the danish language. I often see the
> same with german umlauts.
>
> 1. import the db dump you hopefully created prior to changing the
> collation of db fields containing texts
>
> 2. set textfield datatypes to binary types
>    varchar ->  varbinary
>    text ->  blob
>    tinytext ->  tinyblob
>    and so on and so forth
>
> 3. convert these fields a second time. this time reverse the selection
> of the datatype (varbinary ->  varchar etc.) and select the desired
> unicode collation in an atomic step, meaning at the same time.
>
> this is by far the solution to encodingproblems after a switch to utf-8.

Years ago I made a PHP script [1] to perform this operation. If you have 
utf-8 encoded data in non-utf-8 columns/tables this little script will 
do the conversion for you.

It's supposed to run from any subdirectory of your TYPO3 installation 
(e.g. fileadmin) and by default it's in simulation mode (simply change a 
constant near the beginning of the script to make the real modification).

Do make a backup of your database!

[1] http://www.xs4all.nl/~dcbjht/typo3/db_utf8_fix.zip

-- 
Kind regards / met vriendelijke groet,

Jigal van Hemert.


More information about the TYPO3-english mailing list