Here is the situation:
1. User enters 'Română' ($cat) to search for this subcat in DMOZ database.
2. However, 'Română' is encoded as 'Română' in database (as it is by default in DMOZ dump).
3. Tried the following code, but fails:
my $str = "SELECT `catid` FROM `dstructure` WHERE UCASE(name) = UCASE(CONVERT( _utf8 '$cat' USING latin1 ))";
my $sth = $dbh->prepare($str);
$sth->execute();
$catid = $sth->fetchrow_array();
Ideas? Tried various encoding of input, but no luck. Try another encoding method of dstructure.name?
----
Cheers,
Dan
Principal
Virtual Solutions
1. User enters 'Română' ($cat) to search for this subcat in DMOZ database.
2. However, 'Română' is encoded as 'Română' in database (as it is by default in DMOZ dump).
3. Tried the following code, but fails:
my $str = "SELECT `catid` FROM `dstructure` WHERE UCASE(name) = UCASE(CONVERT( _utf8 '$cat' USING latin1 ))";
my $sth = $dbh->prepare($str);
$sth->execute();
$catid = $sth->fetchrow_array();
Ideas? Tried various encoding of input, but no luck. Try another encoding method of dstructure.name?
----
Cheers,
Dan
Principal
Virtual Solutions

