View Single Post

   
  #4 (permalink)  
Old 05-24-2008, 07:09 AM
Willem Bogaerts
 
Posts: n/a
Default Re: SUBSTRING and UTF-8

> Just to be sure: Did you actually test the SP above, or just the
> SELECT statement?


No. just the select statement. That is why I thought that the encoding
somehow went missing with the parameter passing.
>
>> You could put the encoding back in by explicitly giving it:
>>
>> SELECT SUBSTRING(_utf8 $aNachname, 1, 2) INTO _kurz;


Stupid of me. This is the syntax for literals, like:
SELECT _utf8 0x4DC3BC6C6C6572;
(which is about the only way to get a string correctly into MySQL from a
statement that may be reencoded before being sent to the database)

For expressions, it should be CONVERT($aNachName USING utf8) . Not
tested though.

Good luck,
--
Willem Bogaerts

Application smith
Kratz B.V.
http://www.kratz.nl/
Reply With Quote