#perl - Thu 8 Mar 2007 between 09:09 and 09:18



LeoNerdalnokta: binmode STDOUT, ":utf-8";
Hrm.. though that said, that's for STDOUT, and won't affect the commandline
(the argv[] sent to system())
JasonKingI was going to say that Perl will send it in whatever it IS encoded in (in your perl script).
...probably ASCII or iso-8559-1 or -15
LeoNerdWell, that's the thing... perl strings are supposed to be transparent to such encoding issues
rindolfHi all.
LeoNerdThere's the binmode to specify encodings of filehandles...
dazjorzHi rindolf :)
LeoNerd: does the script work yet?
rindolfdazjorz: hi. what's up?
JasonKingLeoNerd, kind of assumes you're not using system though.
LeoNerdNot sure offhand how you'd do argv[] strings
dazjorzrindolf: Still trying to get the thing working, as if something is against me
LeoNerddazjorz: what script? The tests work fine for me... So I'll need to see your test output to know what's up
dazjorzLeoNerd: I mailed it to you
LeoNerdAh OKe
JasonKingLeoNerd, could use open to open a pipe to the command, and then binmode that pipe FH with the desired layer.
dazjorzLeoNerd: you said you would look at it last night
:)
LeoNerdJasonKing: But that's for a filehandle, not the argv[] strings
alnoktayou mean perl uses the encoding of the file itself to send the output?
JasonKingLeoNerd, yeah, but you've opened a pipe, and then you..........oh, duh!
LeoNerdsystem( "command", $string ); <== filehandles don't affect $string
JasonKingLeoNerd, brain fart.
LeoNerddazjorz: I said I'd look at any mail you sent me... I've not seen one yet
alnoktaLeoNerd: so, i have to specify the encoding used to send?
JasonKingalnokta, the consensus is that there's no way to.
dazjorzLeoNerd: leonerd (A.T) leonerd . org . uk
alnokta:(
LeoNerddazjorz: Ya.. when did you send that..? Maybe my spam filter ate it - I can take a look
dazjorzSent it yesterday
JasonKingalnokta, why do you need it in utf-8?
illsciand in perl is && right?
LeoNerdWell, you'll need it in some encoding or other
illscior is it something else
LeoNerdAnd UTF-8 is a good choice
JasonKingillsci, && for tight binding, "and" for loose.
alnoktaJasonKing: because the text it is writing is in arabic :(
JasonKingalnokta, ah - you might need to specify the utf-8 characters explicitly.

Page: 5 12 19 26 33 40 47 54 61 68 75 82 89 

IrcArchive