[Typo3] Two easy questions

Amr Mostafa amr.mostafa at gmail.com
Sat May 21 11:58:41 CEST 2005


Tomasz Rakowski wrote:
> Hello!
> 
> I have some questions about TYPO3, that for sure will be easy for you:
> 
> First: In my template I have meta tag with charset set to 8859-2. Then I do 
> with this template all steps that are mentioned in ModernTemplateBuilding1, 
> so I have it working now. But, as I see this charset doesn't work fine, 
> because it is two times in my template:
> 
> <!DOCTYPE html
> 	PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <html>
> <head>
> 	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
> 
> <!-- 
> 	This website is brought to you by TYPO3 - get.content.right
> 	TYPO3 is a free open source Content Management Framework created by Kasper 
> Skaarhoj and licensed under GNU/GPL.
> 	TYPO3 is copyright 1998-2004 of Kasper Skaarhoj. Extensions are copyright 
> of their respective owners.
> 	Information and contribution at http://www.typo3.com
> -->
> 
> 	<meta http-equiv="Content-Type" content="text/html; 
> charset=iso-8859-2"/>Why is it so? What creates this first <meta ... 
> charset> and this comment about TYPO3?

Hello,

TYPO3 writes this charset for you, and the comment too.
You should remove the charset meta from your template, TYPO3 will handle 
this for you :)
If you want to tell TYPO3 to change the used charset, you can do so by 
this TS:

config.renderCharset = your_charset_here

# and you can put this optional TS too
config.metaCharset = your_charset_here


However, if you want to keep the charset meta in the template (for any 
mysterious or historical reasons :) you will have to use this TS to tell 
TYPO3 not to write the charset for you:

config.disableCharsetHeader = 1


BTW, you should always use utf-8 encoding.

- Amr



More information about the TYPO3-english mailing list