concat and character encoding
Date: November 20, 2006 04:46AM
EDIT -> solved
yeah i got it!!
CAST(`articles`.`number` AS CHAR CHARACTER SET utf8 )
you have to cast int columns to char before concat use!
i have the following stored function
CREATE DEFINER=`root`@`localhost` FUNCTION `getLiveCurrentArticle`(LNR int, INTIME datetime) RETURNS varchar(255)
DECLARE ARTICLE varchar(255);
SET ARTICLE = (select concat(`articles`.`number`, ' - ', `articles`.`name`)
where `articles`.`id` = getLiveCurrentArticleId(LNR, INTIME));
return Convert(ARTICLE using utf8);
all tables, columns, database connection etc is set to utf8 and i use "set names utf8"
when i only get the "articles.name" everything is fine and in utf8
but when i use concat to show the article number with the article name i geht a different character set back.
i tried using convert (article using utf8) but nothing is happening
how can i define that i only would get utf8???
Edited 1 time(s). Last edit at 11/20/2006 04:51AM by Christian Trummer.
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.