Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Webmaster Zone > Web Development
Register

Reply
 
LinkBack Thread Tools
Old 11.05.2005, 05:45   #1
Web developer
 
Aram Ghazanchyan's Avatar
 
Join Date: 09 2002
Location: Yerevan
Age: 36
Posts: 896
Downloads: 1
Uploads: 0
Reputation: 9 | 0
Default MySQL Unicode problem with armenian

May be this topic was discussed, whatever I have very urgent question concerning armenian text saving into MySQL database. I've tested some texts and still found the following errors on some letters:

1. Armenian "S" is saving as armenian "t"
2. Armenian "c" is saving as "`"

MySQL v. 4.1.10a, PHP 5

Who can help?

and the other question is... I didn't work with armenian texts so much, if I change the mysql version to lower to avoid any collations and encodings and save the data in armscii, can I organize ordering by letters and correct string comparison?
Reply With Quote
Old 12.05.2005, 00:03   #2
Banned
 
Forever Child's Avatar
 
Join Date: 10 2001
Location: ...осень колибри
Age: 37
Posts: 7,487
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

Quote:
Originally Posted by Aram Ghazanchyan
May be this topic was discussed, whatever I have very urgent question concerning armenian text saving into MySQL database. I've tested some texts and still found the following errors on some letters:

1. Armenian "S" is saving as armenian "t"
2. Armenian "c" is saving as "`"

MySQL v. 4.1.10a, PHP 5

Who can help?

and the other question is... I didn't work with armenian texts so much, if I change the mysql version to lower to avoid any collations and encodings and save the data in armscii, can I organize ordering by letters and correct string comparison?
Aram jan, I just tried it with two different conf. Everything works. At home PHP 5.0.4/MySQL 4.1.11. It also works with your litehost hosting. Database encoding 'utf8_general_ci'.
Reply With Quote
Old 12.05.2005, 06:26   #3
Web developer
 
Aram Ghazanchyan's Avatar
 
Join Date: 09 2002
Location: Yerevan
Age: 36
Posts: 896
Downloads: 1
Uploads: 0
Reputation: 9 | 0
Default

It works on lower versions than 4.1, but the ordering is not working there...
I use 4.1.10a, not upgrading to 4.1.11, will see...
Reply With Quote
Old 12.05.2005, 07:08   #4
Web developer
 
Aram Ghazanchyan's Avatar
 
Join Date: 09 2002
Location: Yerevan
Age: 36
Posts: 896
Downloads: 1
Uploads: 0
Reputation: 9 | 0
Default

Sample table dump:
---
CREATE TABLE `sector` (
`ID` int(11) NOT NULL auto_increment,
`Code` varchar(50) collate utf8_bin NOT NULL default '',
`Location` varchar(250) collate utf8_bin NOT NULL default '',
`Tel` varchar(50) collate utf8_bin NOT NULL default '',
UNIQUE KEY `ID` (`ID`),
UNIQUE KEY `Code` (`Code`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=16 ;
---

mi.ini file is in attachment
Reply With Quote
Old 12.05.2005, 07:09   #5
Web developer
 
Aram Ghazanchyan's Avatar
 
Join Date: 09 2002
Location: Yerevan
Age: 36
Posts: 896
Downloads: 1
Uploads: 0
Reputation: 9 | 0
Default

Try to insert in armenian unicode
"Cucak" and "Sebastia"
Reply With Quote
Old 12.05.2005, 11:51   #6
Banned
 
Forever Child's Avatar
 
Join Date: 10 2001
Location: ...осень колибри
Age: 37
Posts: 7,487
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

I just tried it again and it worked.

Showing rows 0 - 0 (1 total, Query took 0.0003 sec) SQL-query:
SELECT *
FROM `sector`
LIMIT 0 , 30
ID Code Location Tel
1ՑուցակՍեբաստիա666

Last edited by Forever Child; 11.02.2006 at 22:05.
Reply With Quote
Old 12.05.2005, 12:11   #7
Web developer
 
Aram Ghazanchyan's Avatar
 
Join Date: 09 2002
Location: Yerevan
Age: 36
Posts: 896
Downloads: 1
Uploads: 0
Reputation: 9 | 0
Default

v. of your database is < 4.1
Reply With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 04:49.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.