[tpm] "Wide character in print" error
Shaun Fryer
sfryer at sourcery.ca
Tue Sep 11 11:32:44 PDT 2007
Hi Madison,
I'm not overly familiar with locale related issues. Plus the code you
sent appeared in my email with all line endings stripped out. Anyway,
I found this link which might prove of use to you. Seems to cover
exactly what you're asking.
http://ahinea.com/en/tech/perl-unicode-struggle.html
If you can resend the code (even off-list) with line endings in tact,
I *might* be able to suggest something more specific.
Good luck,
--
Shaun Fryer
On Tue, Sep 11, 2007 at 02:04:52PM -0400, Madison Kelly wrote:
> Hi all,
> I've got another question, if I may... *shock!* :)
> I've got a program that prints to a browser. Simple enough so far. Some text comes from an XML file (via XML::Simple), and other text comes from a postgres database (set to UTF-8).
> So then; If I print to the browser normally, the unicode text coming from the pgsql db prints fine, but when unicode text from the XML file prints, I get the "Wide character in print" error, but it still prints okay. I don't want to "just live with it" though because this floods the logs...
> If I switch binmode on STDOUT to ':utf8' (binmode STDOUT, ":utf8";), then the text coming from the DB is double-encoded and looks garballed, but the data from the XML file looks fine and *doesn't* generate the "Wide character..." error.
> I've written a very stripped down script to test this:
> -=] test.pl [=-#!/usr/bin/perl
More information about the toronto-pm
mailing list