IDN Forums - Internationalised Domain Names  
idnforums | idntools

Go Back   IDN Forums - Internationalised Domain Names > IDN Development > Browser, Mobile & Software

Browser, Mobile & Software Discussion of IDNs & browsers such as Microsoft IE, mobile cell phones, or other software

Reply
 
Thread Tools Display Modes
  #1  
Old 10-21-2006, 08:57 AM
Drewbert's Avatar
Drewbert Drewbert is online now
Administrator
 
Join Date: Feb 2006
Posts: 2,523
iTrader: (14)
Rep Power: 10
Drewbert is on a distinguished road
PERL CGI Unicode programming hint

If you have any PERL CGI programs and ou're looking for a fast way to set their HTML charset output to UTF-8 from the default ISO-8859, it's real simple...

After creating the new CGI object...

my $q = CGI->new();

simply add...


$q->charset('UTF-8');

Once you have done that, the default charset placed in the header is changed for every page that object creates.

Saves having to arse around with header settings in multiple places in your CGI scrpt.

One warning though, you need a fairly recent CGI.pm perl module on your server.

If it doesn't work, download the latest CGI.pm

#cpan

cpan>install CGI

Easy as that.
__________________
It's all Greek to me.
Reply With Quote
  #2  
Old 10-21-2006, 11:25 AM
yanni's Avatar
yanni yanni is online now
Premium Member
 
Join Date: Feb 2006
Posts: 1,324
iTrader: (27)
Rep Power: 4
yanni is on a distinguished road
Send a message via AIM to yanni
Re: PERL CGI Unicode programming hint

It's all Greek to me
__________________
.
филиалы.com < Social Networking/Dating traffic.
Reply With Quote
  #3  
Old 10-21-2006, 06:53 PM
thegenius1's Avatar
thegenius1 thegenius1 is online now
IDNebook.com
 
Join Date: Jan 2006
Location: IDNaffiliates.com - IDNebook.com
Posts: 3,035
iTrader: (32)
Rep Power: 6
thegenius1 is on a distinguished road
Send a message via Skype™ to thegenius1
Re: PERL CGI Unicode programming hint

Its greek to me aswell but i will be sure to document this for future reference , thanks
__________________
Quote:
Originally Posted by Alphamale
I first partnered with a very bright guy here, who helped me raise investment from a number of different sources... in fact, I have him to thank for half of my portfolio.

The guy is a genius.
Reply With Quote
  #4  
Old 10-21-2006, 07:24 PM
jose's Avatar
jose jose is online now
Veteran
 
Join Date: Jan 2006
Posts: 2,374
iTrader: (23)
Rep Power: 5
jose is on a distinguished road
Re: PERL CGI Unicode programming hint

And in PHP utf8_encode() and utf8_decode()
__________________
idn.bz <- free automatic idn appraisal
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 08:43 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.5
Copyright idnforums.com 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103