On Wed, Jan 29, 2003 at 10:57:12AM -0800, Fernando Munoz wrote: > Thanks Phillip, that solves the problem. I managed myself to find a less > elegant but, equally effective, solution. I operates over the string passing > the result to a second scalar that gets encoded as a string of bytes: > > my $lstring = length($description); > my $newdesc = substr($description,0,$lstring); <- Here $newdesc has $description as >a string of bytes > > After this the digests are all different and correct. It is not > elegant but works.
Using substr() to unset the string's UTF8 flag seems to be a dangerous thing to do; it may work now, but if a future version of Perl changes substr() to understand characters instead of bytes, then your above code would end up having no effect. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]