[TYPO3-dev] OT: special characters in SQL
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Tue Mar 7 14:14:15 CET 2006
Dimitri Tarassenko schrieb:
> Christian,
>
> On 3/7/06, Christian Lerrahn <typo3 at penpal4u.net> wrote:
>
>
>>The COLLTE function doesn't really help much. My problem is not the
>>sorting but the WHERE clause. I have a WHERE clause like "WHERE title
>>LIKE 'A%'" I now want to add " OR title LIKE 'Ä%'" so that Ä would be
>>listed together with A. I think I'd have to manually link Ä to A but this
>>is where the problem arises. How do I have to encode "Ä" in the script
>>that it is later read in the correct way? Is this system dependent?
>
>
> No, it's not system dependent if you stick to UTF. You'll probably
> need to make sure mbstring settings are correct if you start chopping
> off first 1 character from a string like that.
Yep, either store only this field in in UTF-8 or easer use
forceCharset=utf-8 and use utf-8 for the BE and the FE. If you don't want
to use forceCharset=utf-8 then you have to do the conversion manually (use
the functions in t3lib_cs).
Masi
More information about the TYPO3-dev
mailing list