[TYPO3-dev] Sorting and grouping of list - problem with rendering non-english characters

Erik Svendsen erik at linnearad.no
Mon Jun 8 10:21:01 CEST 2009


I'm working with an extension which are going to render a list in 
frontend like this.

A
A new day
About TypoScript

E
Evalueting of CMS

ans so on. Every title, text are linking to more information

Fetching the data from the database is not a problem, neither is 
grouping and rendering the letter and title for 0 - 9 and A - Z. But the 
rendering of non-english characters as single letter is a problem.

I fetch the list as an array ( and using

	$firstletter = row[field][0];

to fetch the first letter of the sentence/title and place it in a 
marker. But all non-english letters gives the same first letter, with 
ASCII code 195 and it render as either � or Ã, but the titles are 
rendering correct.

Example

	�
	Äncore min sang
	Ærlighet varer lengst
	Øyeblikkelig transportbehov
	Åpne en post

Correct should have been

	Ä
	Äncore min sang
	
	Æ
	Ærlighet varer lengst
	
	Ø
	Øyeblikkelig transportbehov
	
	Å
	Åpne en post

I have tried with htmlspecialchars, htmlentities, utf8_encode with no 
luck. Tried it on to servers with a bit different setting. On the test 
server is everything from database, PHP, Apache and TYPO using utf-8.

Hope somebody has an idea how to solve this. Or is it a bug somewhere.

Bests

Erik




More information about the TYPO3-dev mailing list