title: mysql stored function return value charset
body: <p>I have mysql user defined function </p>
  
  <pre><code>DELIMITER $$ 
      CREATE FUNCTION `myfunc`(`str` TEXT) RETURNS TEXT CHARSET utf8
  NO SQL
  DETERMINISTIC
  SQL SECURITY INVOKER
  BEGIN
  
  RETURN str;
  END$$
  
  DELIMITER ;
  </code></pre>
  
  <p>it just returns passed parameter back without any changes</p>
  
  <p>My problem is that if I pass some russian or greece letters then I get back only ?????? as response </p>
  
  <pre><code>SELECT myfunc('ывфафывавы');
  </code></pre>
  
  <p>will return 
      ??????????</p>
  
  <p>if I call 
      SELECT myfunc('sdfasfsdf');
  I get 
      sdfasfsdf
  as result</p>
  
  <p>Can't find where the prob is , any ideas ?</p>