[TYPO3-english] TYPO3 and character encoding problems

Jigal van Hemert jigal.van.hemert at typo3.org
Tue Jul 8 11:12:33 CEST 2014


Hi,

On 7-7-2014 21:32, Pero Peric wrote:
> Database character set is UTF-8
> Character set of all tables is UTF-8
> Character set of all columns is UTF-8
> All columns seem to contain correctly encoded data

Okay, most common problems are not present, which is actually a good 
thing (although you might not think so :-) )

> Like all is ok, but it's not. I can see that hexadecimal char values are
> not right in DB.
>
> What I would like to know - what does forceCharset setting do? If i set
> this to blank in 4.4.0 i get garbage characters. If i set it to UTF-8
> all is fine. I searched to find how TYPO3 convert this but didn't find
> anything :-(

[BE][forceCharset] sets the character set for the backend of TYPO3. If 
you don't set it browsers may use different character sets (for example 
in different countries). In case of multi-language content and editors 
all over the world you can imagine that content can be submitted in a 
mix of character sets and encodings and also stored this way.

Without a forced character set it just depends on what your browser 
decides to use and send to the server. Maybe you can see in your browser 
somewhere which character set it decides to use in your 4.4 backend. It 
could be that Č in that character set has the same position as Ä in 
ISO-8895-1 (the internal default character set in PHP) and because the 
database connection was set up as UTF-8 it was stored as hex C384.
If you find out which character set was used by the browser in 4.4 it 
could be used to construct queries that convert the data into the 
correct characters.

-- 
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-english mailing list