In article <p05101000b77fc1e115e5@[192.168.1.16]>,
 [EMAIL PROTECTED] (Will) wrote:

> on the server or client. it seems that perl on os x uses the mac 
> roman character set until run under cgi, at which point it prints 
> 7bit ascii. You can confirm this by running:
> 
> #!/usr/bin/perl
> print("$  = " . chr($ ) . "\n") for (32..255);
> 
> which produces different results in the terminal and the browser.

I think you are mistaken, a bit.  It is not that perl uses a different 
character set in the two environments, it is that the two environments 
have different default character sets.  perl itself emits the same data, 
but the terminal displays MacRoman while the web browser displays 
Latin-1.  It might even be that the terminal and browser are completely 
"dumb" and just passing that information along to your font.

Look in the Terminal app settings, see if it has a character set 
setting, or see if it has a Latin-1 font you can choose.  Also, when 
viewing the CGI output in MSIE, look at Character Set and change it from 
Latin-1 to Mac.

In general, perl doesn't care about character sets or know what 
character set a string is in (except for Unicode, which I don't know 
much about).  It's all just data.  It's how that data is rendered that 
changes between platforms/environments/applications/fonts/etc.

-- 
Chris Nandor                      [EMAIL PROTECTED]    http://pudge.net/
Open Source Development Network    [EMAIL PROTECTED]     http://osdn.com/

Reply via email to