[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

warning: variable $KCODE is no longer effective

Eric Hodel

12/13/2007 12:22:00 AM

This warning comes from accessing $KCODE. What should be used instead?

In particular, this snippet from RDoc:

> @charset = case $KCODE
> when /^S/i
> 'Shift_JIS'
> when /^E/i
> 'EUC-JP'
> else
> 'iso-8859-1'
> end

Eventually @charset is placed in a <meta http-equiv> in the output
RDoc. Is there a better way to determine the charset of a file?