Encoding problem in routine
Hello,
our production server uses mysql Ver 14.12 Distrib 5.0.41, for pc-linux-gnu (i486) using readline 5.2 on a Debian Linux distribution.
I have created this routine:
DELIMITER //
DROP FUNCTION IF EXISTS TEST_chr;//
CREATE FUNCTION TEST_chr () RETURNS VARCHAR (32)
BEGIN
RETURN 'à clôturer';
END;//
Here the result:
mysql> select TEST_chr()//
+------------+
| TEST_chr() |
+------------+
| à clôturer |
+------------+
1 row in set (0.00 sec)
The problem is that:
mysql> SHOW CREATE FUNCTION TEST_chr;
Function | TEST_chr
sql_mode | STRICT_TRANS_TABLES,STRICT_ALL_TABLES,
NO_ZERO_IN_DATE,NO_ZERO_DATE,
ERROR_FOR_DIVISION_BY_ZERO,
TRADITIONAL,NO_AUTO_CREATE_USER
Create Function | CREATE DEFINER=`root`@`localhost`
FUNCTION `TEST_chr`() RETURNS
varchar(32) CHARSET latin1
BEGIN
RETURN '? cl?turer';
END
Why do accents dissapear (à and ô becoming ?)?
Thanks,
Sylvain
Subject
Views
Written By
Posted
Encoding problem in routine
3457
September 05, 2007 04:27AM
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.