in reply to Re^2: Regex for MS Word Special Characters
in thread Regex for MS Word Special Characters
Otherwise, let's assume then that you can only store 8-bit character data in your database, and that you are currently only storing ASCII data (i.e. characters from 0-127). Then you could do something along these lines:
Unfortunately, one really thorny issue is that there just too many ways to get data out of a database using DBI, i.e. fetchrow_*, select*_*, etc. If there was a way to install a data transformation filter in DBI, then might be a reasonable approach. Perhaps someone else knows if this is possible.# Instead of: $sth->execute(@data); # use: use Encode; $sth->execute(map { Encode::encode('utf8', $_) } @data); # and in place of: my @row = $sth->fetchrow; # use: my @row = map { Encode::decode('utf8', $_) } $sth->fetchrow;
|
|---|