perl-unicode

binary compare of scalars

2000-05-03 01:20:53
I need a portable way to compare two strings, one might be utf8
and one in byte semantic. It should work in all 5.x perl versions
without too many $] tests. There is probably a very obvious and
good way to do it (and also more than one), which I do not see.

Can anyone help?

Stefan

Background: I have patched DBD::Oracle to recognize utf8 locale
and return utf8 scalars for Perl 5.6.0. It works. In one of the
standard tests however, a string with utf8 chars is inserted
into a BLOB, correctly read back again, but not eq to the original
string. 
I give things returned from BLOBs byte semantic (think I have to). 
I need a way to do byte-compare input and output of this blob test.

<Prev in Thread] Current Thread [Next in Thread>