We’ve been working on a site for a customer for some time now based on TYPO3. As the the respect to typographical issues where important we decided to go forth using GMENU and GIFBUILDER for menus and headings. I really like the concept of GIFBUILDER and working with it. Sadly we got problems with non ascii characters like our swedish åäö and such. They where replaced by ugly boxes.

So, why on earth did this happend I questioned my self.. and people on #typo3 @ irc.freenode.org.
I ended up with these suggestions/requirements:
- Make sure you use utf-8 all the way. Gifbuilder (probably GD/freetype really)
- Check that the font you use is unicode
- Check configuration for mbstring (or iconv) that gifbuilder uses
I did all this. Utf-8 was a requirement for the project as the site will be on both chinese, swedish and english. The font seemed to be in Unicode as well (as far as I could tell). And mbstring was working like a charm..
It’s importent to mention that the development server was a windows server.
Anyway. I copied the site to my local windows computer and tested it. The same buggy result. The I copied it to my own webserver running on debian linux and there it worked! Why? Donno.. However. I went back to my local computer and replaced the font with arial. I got nifty åäö all the sudden. This at least allowed me to assume that it had something to do with the font file (a .otf file btw). The only solution I could think of now would be to convert the font hopfully to utf-8. I got merely no experience with typographical things so this was a blank area for me, but after som googleing I stumbled upon fontforge (http://fontforge.sf.net). It’s actually a *NIX application but I installed Cygwin (along with xfce4), and the cygwin port of fontforge. Wow what an app! A really crappy gui, but wow!

So, I went on and converted my .otf font forcing it to Full unicode, replaced it in my exsisting font on the site. It worked like a charm!
My final configuration on every aspect turned out like this:
localconf.php:
-
-
// UTF-8 support
-
$TYPO3_CONF_VARS[‘GFX’][‘gdlib_2′] = ’1′;
-
$TYPO3_CONF_VARS[‘BE’][‘forceCharset’] = ‘utf-8′;
-
// For GIFBUILDER support
-
// Set it to ‘iconv’ or ‘mbstring’
-
$TYPO3_CONF_VARS[‘SYS’][‘t3lib_cs_convMethod’] = ‘mbstring’;
-
// For ‘iconv’ support you need PHP 5!
-
$TYPO3_CONF_VARS[‘SYS’][‘t3lib_cs_utils’] = ‘mbstring’;
-
// For Asian languages
-
$TYPO3_CONF_VARS[‘SYS’][‘multiplyDBfieldSize’] = 3;
-
//force db communication to utf8
-
$TYPO3_CONF_VARS[‘SYS’][‘setDBinit’] = ‘SET NAMES utf8;’;
-
Typoscript
-
-
-
## GIFBUILDER HEADING RENDER SETUP ########
-
##
-
##### Header 1
-
cHeader1 = IMAGE
-
cHeader1 {
-
alttext.cObject = TEXT
-
alttext.cObject.field = header
-
wrap = <div class="h1gfx">|</div>
-
file = GIFBUILDER
-
file {
-
format = gif
-
reduceColors = 15
-
transparentColor = #ffffff
-
XY = [10.w]+2,[10.h]+8
-
backColor = #ffffff
-
10 = TEXT
-
10 {
-
text.field = header
-
fontSize = 14
-
offset = 0,20
-
fontColor = #333333
-
fontFile = fileadmin/fonts/NewsGothicStd_utffull.ttf
-
antiAlias = 1
-
value.case = upper
-
}
-
}
-
}
-
Database was set to full utf-8 charset in all tables from the beginning.
See http://wiki.typo3.org/index.php/UFT-8_support about utf-8 support for TYPO3.