note
joec_
Hi,
Im grateful for your detailed explanation. But, i am still having problems.<p>If i run your code, with the micron encoded as <code>\x{C2}\x{B5}</code> then just using <code>decode('utf8',$clob)</code> seems to work. As you can see from the first set of clob/conv strings below, after the bytes stuff.
<code>
clob: 74:68:69:73:20:69:73:20:73:74:72:69:6E:67:20:77:69:74:68:20:C2:B5:20:69:6E:20:69:74 -- byte
conv: 74:68:69:73:20:69:73:20:73:74:72:69:6E:67:20:77:69:74:68:20:C2:B5:20:69:6E:20:69:74 -- utf8
unix perlio
clob: 'this is string with µ in it'
conv: 'this is string with µ in it'
unix perlio encoding(utf8) utf8
clob: 'this is string with õ in it'
conv: 'this is string with µ in it'
</code>
However if i actually type a micron into the string using Alt-0181 then i get the following output: note i turned <code>use diagnostics</code> on.
<code>
clob: 74:68:69:73:20:69:73:20:73:74:72:69:6E:67:20:77:69:74:68:20:B5:20:69:6E:20:69:74 -- byte
conv: 74:68:69:73:20:69:73:20:73:74:72:69:6E:67:20:77:69:74:68:20:EF:BF:BD:20:69:6E:20:69:74 -- utf8
unix perlio
clob: 'this is string with µ in it'
Wide character in print at 742047.pl line 19 (#1)
(W utf8) Perl met a wide character (>255) when it wasn't expecting
one. This warning is by default on for I/O (like print). The easiest
way to quiet this warning is simply to add the :utf8 layer to the
output, e.g. binmode STDOUT, ':utf8'. Another way to turn off the
warning is to add no warnings 'utf8'; but that is often closer to
cheating. In general, you are supposed to explicitly mark the
filehandle with an encoding, see open and perlfunc/binmode.
conv: 'this is string with � in it'
unix perlio encoding(utf8) utf8
clob: 'this is string with µ in it'
conv: 'this is string with � in it'
</code><p>That last conv string is i assume your splodge? Perhaps then as no question marks are being output, this is not an encoding problem at all?<p>I honestly do appreciate all your time<p>Joe.
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-707693">
Eschew obfuscation, espouse eludication!
</div></div>
741927
742047