Wrong codepage

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
mobileuser
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 21.03.2006, 06:41

Wrong codepage

Post by mobileuser »

I have the table
CREATE TABLE `patient` (
`idPatient` int(10) unsigned NOT NULL auto_increment,
`LName` varchar(45) default NULL,
`FName` varchar(45) default NULL,
`PName` varchar(45) default NULL,
`Street` varchar(45) default NULL,
`House` int(10) unsigned default NULL,
`Building` varchar(3) default NULL,
`Apartament` varchar(10) default NULL,
PRIMARY KEY (`idPatient`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8

My TZConnection has codepage=cp1251

when I execute a query

'select a.*,concat_ws(' ',a.lname,a.fname,a.pname) as fio,a.street,
concat_ws(',',a.street,
concat_ws('/', a.house,a.building),
a.apartament
) as address
from patient as a
order by a.lname,a.fname,a.pname'

the field 'address' don't displays in codepage=cp1251
but the field 'fio' is right.

But if I execute the query

select a.*,concat_ws(' ',a.lname,a.fname,a.pname) as fio,a.street,
concat_ws(',',a.street,
concat_ws('/',cast(a.house as char),a.building),
a.apartament
) as address
from patient as a
order by a.lname,a.fname,a.pname'

then all it's ok

Why?Is it bug or propery of Mysql?
Post Reply