Re: persian collation
Posted by: morteza ir
Date: February 07, 2011 03:22AM

Hi
Thank you a lot for answering. I found the answer yesterday. Let me explain, may it help someone else too.
4 mounth ago i created my dataBase. I start it with latin1 because i didnt khow about utf8. I created some stored procedure too. after a while i found that it cant work with persian languages, so i googled and i found utf8 then change database charecter set to utf8.
Yesterday i found out when i dump (mysqldump) stored procedures it create two line of “ALTER DATABASE ppcsystem CHARACTER SET latin1 COLLATE latin1_swedish_ci “ and “ ALTER DATABASE ppcsystem CHARACTER SET utf8 COLLATE utf8_general_ci “ before of each stored prosedures like below. (it really confused me. I dont know why)

DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
ALTER DATABASE ppcsystem CHARACTER SET utf8 COLLATE utf8_general_ci ;
/*!50003 DROP FUNCTION IF EXISTS `mySP_EXAMPLE ` */;
ALTER DATABASE ppcsystem CHARACTER SET latin1 COLLATE latin1_swedish_ci ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 FUNCTION ` mySP_EXAMPLE `(
idAds INTEGER(11),
idHost INTEGER(11)
) RETURNS int(11)
BEGIN
set @Ret = null ;

set @Ret = (select count(a.idAds) from adsdetail a where a.idAds = idAds and a.idHost = idHost);

return @Ret;
END */;;

This was the reason of my problem. I recompile all stored procedure agian and it fix :)
I hope this help who have my problem too.
Best Regards.
morteza

Options: ReplyQuote


Subject
Views
Written By
Posted
7468
February 05, 2011 02:36PM
2002
February 06, 2011 05:25PM
Re: persian collation
4968
February 07, 2011 03:22AM


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.