On 2004-06-29 08:15:40 +0900, KAWAI,Takanori wrote:
> > Is there any support in the DBD package (or any workarounds) for
> > handling searches in MultiByte Character Set data?
> How about this sample?
> This script works on my Linux box (ie Only NO=2 are selected). 
> But not works correctly on my Windows one. It gets 2 lines.
> Just because, MySQL on my Windows uses ShiftJIS not EUC-JP.

Which is hardly surprising:

> my $hSt = $hDb->prepare("SELECT * FROM t1 WHERE NAME like ?");
> $hSt->execute("%\xB9\xA5%");  #SUKI in KANJI(EUC-JP)

You are telling MySQL to do the matching. So the matching will use
whatever character set the database thinks the data uses. If you tell
the database that the data is ShiftJIS when it is really EUC-JP,
confusion is to be expected. 

        hp

-- 
   _  | Peter J. Holzer      | Shooting the users in the foot is bad. 
|_|_) | Sysadmin WSR / LUGA  | Giving them a gun isn't.
| |   | [EMAIL PROTECTED]        |      -- Gordon Schumacher,
__/   | http://www.hjp.at/   |     mozilla bug #84128

Attachment: pgpQmpTPe1OGd.pgp
Description: PGP signature

Reply via email to