IDN Forums - Internationalized Domain Names  
Home | idntools | Advertise on idnforums | Premium Membership

Go Back   IDN Forums - Internationalized 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
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 21st October 2006, 07:57 AM
Drewbert's Avatar
Administrator
 
Join Date: Feb 2006
Posts: 5,819
iTrader: (20)
Rep Power: 0
Drewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgyDrewbert is a tad dodgy
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 jaded style to me.
Reply With Quote
  #2 (permalink)  
Old 21st October 2006, 10:25 AM
yanni's Avatar
Senior Member
 
Join Date: Feb 2006
Posts: 2,216
iTrader: (34)
Rep Power: 968
yanni is on a distinguished roadyanni is on a distinguished roadyanni is on a distinguished roadyanni is on a distinguished roadyanni is on a distinguished roadyanni is on a distinguished road
Send a message via AIM to yanni Send a message via Skype™ to yanni
Re: PERL CGI Unicode programming hint

It's all Greek to me
Reply With Quote
  #3 (permalink)  
Old 21st October 2006, 05:53 PM
thegenius1's Avatar
Senior Member
 
Join Date: Jan 2006
Location: IDNaffiliates.com - IDNebook.com
Posts: 3,793
iTrader: (37)
Rep Power: 783
thegenius1 is an unknown quantity at this pointthegenius1 is an unknown quantity at this pointthegenius1 is an unknown quantity at this pointthegenius1 is an unknown quantity at this pointthegenius1 is an unknown quantity at this point
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
__________________
"We're not talking a few % here or there, we're talking about game-changing differences" Park Here
Reply With Quote
  #4 (permalink)  
Old 21st October 2006, 06:24 PM
jose's Avatar
Veteran
 
Join Date: Jan 2006
Posts: 8,424
iTrader: (48)
Rep Power: 4678
jose is just really nicejose is just really nicejose is just really nicejose is just really nicejose is just really nicejose is just really nicejose is just really nicejose is just really nicejose is just really nicejose is just really nicejose is just really nicejose is just really nicejose is just really nice
Re: PERL CGI Unicode programming hint

And in PHP utf8_encode() and utf8_decode()
__________________
I am now into iOS and Android app development. Want an app? I might help.
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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:30 AM.

Site Sponsors
Your ad here
buy idns
domain name lawyer
buy t-shirt
מחיר הזהב

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Copyright idnforums.com 2005

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