Typo3: Add string to headerData in Extension

$GLOBALS[‘TSFE’]->additionalHeaderData[$extKey] = “<title>Page title</title>”;

Typo3: Change page title to tt_news title

If we are on a tt_news detail view page, we want to display the tt_news title in the page title.
In this case, the page title is stored in page.headerData.100.

[globalVar = GP:tx_ttnews|tt_news > 0]
page.headerData.100.field =

temp.newsTitel = COA
temp.newsTitel {
wrap =
5 = RECORDS
5 {
source = {GPvar:tx_ttnews|tt_news}
source.insertData = 1
tables = tt_news
conf.tt_news >
conf.tt_news = TEXT
conf.tt_news.field=title
}
}

page.headerData.100 < temp.newsTitel
[global]

MySQL: Convert BLOB inside Query

Example: s.data is a BLOB field.

SELECT CAST(s.data AS CHAR(10000) CHARACTER SET utf8) as blabla FROM sync_transport s LIMIT 0,1000

or

SELECT CONVERT(s.data USING utf8) as blabla FROM sync_transport s LIMIT 0,1000

The difference between utf8_general_ci, utf8_unicode_ci & utf8_bin

I found this very interesting question at stackoverflow:

What are the diffrences between utf8_general_ci and utf8_unicode_ci?

utf8_general_ci is a very simple collation. What it does – it just – removes all accents – then converts to upper case

utf8_unicode_ci supports so called expansions and ligatures, for example: German letter ß (U+00DF LETTER SHARP S) is sorted near “ss” Letter Œ (U+0152 LATIN CAPITAL LIGATURE OE) is sorted near “OE”.
utf8_general_ci does not support expansions/ligatures, it sorts all these letters as single characters, and sometimes in a wrong order.

utf8_unicode_ci is generally more accurate for all scripts. For example, on Cyrillic block: utf8_unicode_ci is fine for all these languages: Russian, Bulgarian, Belarusian, Macedonian, Serbian, and Ukrainian. While utf8_general_ci is fine only for Russian and Bulgarian subset of Cyrillic. Extra letters used in Belarusian, Macedonian, Serbian, and Ukrainian are sorted not well.
The disadvantage of utf8_unicode_ci is that it is a little bit slower than utf8_general_ci.

So when you need better sorting order – use utf8_unicode_ci, and when you utterly interested in performance – use utf8_general_ci.

Source: http://forums.mysql.com/read.php?103,187048,188748#msg-188748

Source: http://stackoverflow.com/questions/1036454/what-are-the-diffrences-between-utf8-general-ci-and-utf8-unicode-ci

Additional I can say: utf8_bin is case-sensitive because it’s binary! 🙂

Replace a string in a file in CLI (Command Line), Linux

For instance, you would like to replace ‘abc’ with ‘def’ everywhere in your file, do the following:

cat file1.txt | sed -e ‘s/abc/def/’ > file2.txt

Very short HOWTO: LAMP on Ubuntu 10.10 for Typo3

apt-get install apache2 php5 libapache2-mod-php5 mysql-server libapache2-mod-auth-mysql php5-mysql phpmyadmin php-pear php5-dev imagemagick libmagickwand-dev

Design a site like this with WordPress.com
Get started