RE: is there a way to force UTF-8 encoding

2006-03-03 Thread John N. Brahy
> -Original Message-
> From: Christopher H. Laco [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 03, 2006 12:53 PM
> To: [EMAIL PROTECTED]
> Cc: John N. Brahy; modperl@perl.apache.org
> Subject: Re: is there a way to force UTF-8 encoding
> 
> Christopher H. Laco wrote:
> > Christopher H. Laco wrote:
> >> John N. Brahy wrote:
> >>>> -Original Message-
> >>>> From: Christopher H. Laco [mailto:[EMAIL PROTECTED]
> >>>> Sent: Friday, March 03, 2006 12:28 PM
> >>>> To: John N. Brahy
> >>>> Cc: modperl@perl.apache.org
> >>>> Subject: Re: is there a way to force UTF-8 encoding
> >>>>
> >>>> John N. Brahy wrote:
> >>>>> Is there a way to force UTF-8 encoding? I have tried
> >>>>>
> >>>>> AddDefaultCharset utf-8 in the httpd.conf
> >>>>>
> >>>>> OS: OpenBSD
> >>>>> Apache: Apache/1.3.29 (Unix) mod_perl/1.29 mod_ssl/2.8.16
> OpenSSL/0.9.7g
> >>>>>
> >>>>> But
> >>>>> 1) wget -S says it's Content-Type: text/html; charset=ISO-8859-1
> >>>>> 2) when I try the HTML validator on w3c.org it tells me that it's
> >>>>> ISO-8859-1
> >>>>> 3) Internet Explorer and Firefox both have ISO-8859-1 selected
> >>>>> 4) Firefox's Page Info shows it as ISO-8859-1
> >>>>>
> >>>>> Anybody know a way to force it to utf-8?
> >>>> Are there actually any UTF-8 encoded characters in the output?
> >>>> If their aren't any, then the document can really be both encodings
> at
> >>>> the same time, unless of course the document also includes a BOM
> (Byte
> >>>> Order Marker).
> >>>>
> >>>> -=Chris
> >>> Yes, it's a Spanish site that I'm developing for Verizon and they have
> characters that show up incorrectly.
> >>>
> >>> http://www.verizonnoticias.com/
> >>>
> >>> We've done most everything to encode into HTML entities but our client
> will need to copy and paste from MS word so they will definitely have more
> of these characters. Sometimes they show up as boxes and sometimes they
> show up as this character à even though it's actually a ñ
> >>>
> >>>
> >> If you view the page in Firefox, and then manually select the UTF-8
> >> encoding from View -> Character Encoding -> Unicode(UTF-8) ...does the
> >> page then display correctly?
> >>
> > For me, in Firefox 1.5.0.1, It indeed loads as ISO-8859-1 Latin1. I
> > don't notice and questionable characters on the page.
> >
> > If I tell firefox to use UTF-8, it looks the same for me.
> >
> > -=Chris
> >
> Also, subpages, like http://www.verizonnoticias.com/News/Article/272/
> work just fine and come through as UTF-8

It's the homepage that is giving me problems. And now we just added 
HTML::Entities to the CMS and our content person just pasted HTML into the 
field so we are now seeing "Español " with the ñ being escaped. 
So now I'm off in another direction trying to find out how to only encode the 
characters that are giving us problems. I think I'm going to have to write a 
custom encoder to only encode the special characters. 

Thanks for your time and help,

John


RE: is there a way to force UTF-8 encoding

2006-03-03 Thread John N. Brahy

> -Original Message-
> From: Christopher H. Laco [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 03, 2006 12:28 PM
> To: John N. Brahy
> Cc: modperl@perl.apache.org
> Subject: Re: is there a way to force UTF-8 encoding
> 
> John N. Brahy wrote:
> > Is there a way to force UTF-8 encoding? I have tried
> >
> > AddDefaultCharset utf-8 in the httpd.conf
> >
> > OS: OpenBSD
> > Apache: Apache/1.3.29 (Unix) mod_perl/1.29 mod_ssl/2.8.16 OpenSSL/0.9.7g
> >
> > But
> > 1) wget -S says it's Content-Type: text/html; charset=ISO-8859-1
> > 2) when I try the HTML validator on w3c.org it tells me that it's
> > ISO-8859-1
> > 3) Internet Explorer and Firefox both have ISO-8859-1 selected
> > 4) Firefox's Page Info shows it as ISO-8859-1
> >
> > Anybody know a way to force it to utf-8?
> 
> Are there actually any UTF-8 encoded characters in the output?
> If their aren't any, then the document can really be both encodings at
> the same time, unless of course the document also includes a BOM (Byte
> Order Marker).
> 
> -=Chris

Yes, it's a Spanish site that I'm developing for Verizon and they have 
characters that show up incorrectly. 

http://www.verizonnoticias.com/ 

We've done most everything to encode into HTML entities but our client will 
need to copy and paste from MS word so they will definitely have more of these 
characters. Sometimes they show up as boxes and sometimes they show up as this 
character à even though it's actually a ñ 






is there a way to force UTF-8 encoding

2006-03-03 Thread John N. Brahy
Is there a way to force UTF-8 encoding? I have tried

AddDefaultCharset utf-8 in the httpd.conf

OS: OpenBSD 
Apache: Apache/1.3.29 (Unix) mod_perl/1.29 mod_ssl/2.8.16 OpenSSL/0.9.7g

But 
1) wget -S says it's Content-Type: text/html; charset=ISO-8859-1
2) when I try the HTML validator on w3c.org it tells me that it's
ISO-8859-1
3) Internet Explorer and Firefox both have ISO-8859-1 selected
4) Firefox's Page Info shows it as ISO-8859-1

Anybody know a way to force it to utf-8?


: John Brahy
: CIO
: www.ad2.com

: [EMAIL PROTECTED]
: t: 310-356-7500
: f: 310-356-7520

: ad2, Inc.
: 1990 East Grand Ave, Suite 200
: El Segundo, CA 90245



RE: Content Disposition header and file contents sequence...

2006-03-02 Thread John N. Brahy
Just as I give up and email the list 

I figured out that the database wasn't returning the filename so it
wasn't able to open the file for download so when I hard coded a
filename it started working. The thing I don't understand is why didn't
I get a server error when it wasn't able to open a file... 



> -Original Message-
> From: John N. Brahy [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 02, 2006 10:46 AM
> To: modperl@perl.apache.org
> Subject: Content Disposition header and file contents sequence...
> 
> This is the relevant part of my handler for a link that I want to
force
> a download for. I know it's content-disposition but for some reason I
> can not get it to actually download the file. I get the download
dialog
> and I choose the location to save it but when I open the document it
is
> empty. I've tried changing the sequence of the items but it never
works.
> 
> 
> my $filename = "/usr/local/app/media/videos/downloads/preview.mov";
> unless ($fileFH = Apache::File->new($filename)){
>   $r->log_error("couldn't open $filename for reading: $!");
>   return SERVER_ERROR;
> }
> $r->content_type('video/quicktime');
> $r->headers_out->set('Content-Disposition' =>
> "attachment;filename=$downloadFilename");
> $r->send_fd($fileFH);
> $r->send_http_header();
> return OK;
> 
> 
> 
> 
> 
> : John Brahy
> : CIO
> : www.ad2.com
> 
> : [EMAIL PROTECTED]
> : t: 310-356-7500
> : f: 310-356-7520
> 
> : ad2, Inc.
> : 1990 East Grand Ave, Suite 200
> : El Segundo, CA 90245



Content Disposition header and file contents sequence...

2006-03-02 Thread John N. Brahy
This is the relevant part of my handler for a link that I want to force
a download for. I know it's content-disposition but for some reason I
can not get it to actually download the file. I get the download dialog
and I choose the location to save it but when I open the document it is
empty. I've tried changing the sequence of the items but it never works.


my $filename = "/usr/local/app/media/videos/downloads/preview.mov";
unless ($fileFH = Apache::File->new($filename)){
$r->log_error("couldn't open $filename for reading: $!");
return SERVER_ERROR;
}
$r->content_type('video/quicktime'); 
$r->headers_out->set('Content-Disposition' =>
"attachment;filename=$downloadFilename");
$r->send_fd($fileFH);
$r->send_http_header();
return OK;





: John Brahy
: CIO
: www.ad2.com

: [EMAIL PROTECTED]
: t: 310-356-7500
: f: 310-356-7520

: ad2, Inc.
: 1990 East Grand Ave, Suite 200
: El Segundo, CA 90245