Re: [good] Re: [cgiirc-general] CGI:IRC 0.5.5pre1
Brought to you by:
dgl
|
From: Onslo <on...@ni...> - 2004-02-04 17:17:25
|
Oops, it appears I mailed this directly to David without cc'ing the list - sorry ! Here's what I sent for the benefit of everyone else (perhaps?) Guys, I have played around with UTF-8 and CGI:IRC before, but have only just got to a point whereby my findings are understandable to myself ! Enabling UTF-8 (Unicode Charset) in CGI:IRC is relatively easy, but you have to define the charset in numerous places for it to be accepted on both input and output. I'll use the ie.pm file as an example, but the same should apply to all interfaces really. Add this line inside every HEAD tag within the ie.pm file .. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> that way you are defining the browser encoding that should be used by IE. Then you have to tell the CGI::IRC form to accept UTF-8 as an input charset within it's form structure. I managed this by adding... ACCEPT-CHARSET="UTF-8" within the form tag for hsubmit and myform. eg. <form ACCEPT-CHARSET="UTF-8" name="myform" onSubmit="return cmd();" class="form-form"> Hope that helps Onslo Wednesday, February 4, 2004, 1:04:59 AM, you wrote: JW> On Tue, 3 Feb 2004, David Leadbeater wrote: >> # The charset to send to IRC, to send anything other than UTF-8 you will >> # need the Text::Iconv perl module installed. Any character set supported >> # by your system iconv should work here. JW> I just remembered the module Encode (perldoc Encode)... it is standard but JW> I think it only comes with perl 5.8, so Text::Iconv should be more JW> portable. -- Best regards, Onslo mailto:on...@ni... |