view release on metacpan or search on metacpan
examples/htdocs/login.html view on Meta::CPAN
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>
AppSamurai Login
</title>
<meta http-equiv="content-type" content="text/html; charset=us-ascii" />
<meta http-equiv="pragma" content="no-cache" />
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />
<style type="text/css">
/*<![CDATA[*/
<!--
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/AuthCookie.pm view on Meta::CPAN
AuthCookie provides support for decoding POST/GET data if you tell it what the
client encoding is. You do this by setting the C<< ${auth_name}Encoding >>
setting in C<httpd.conf>. E.g.:
PerlSetVar WhateEverEncoding UTF-8
# and you also need to arrange for charset=UTF-8 at the end of the
# Content-Type header with something like:
AddDefaultCharset UTF-8
Note that you B<can> use charsets other than C<UTF-8>, however, you need to
arrange for the browser to send the right encoding back to the server.
If you have turned on Encoding support by setting C<< ${auth_name}Encoding >>,
this has the following effects:
lib/Apache/AuthCookie.pm view on Meta::CPAN
=back
=head2 Requires
You can also specify what the charset is of the Apache C<< $r-E<gt>requires >>
data is by setting C<< ${auth_name}RequiresEncoding >> in httpd.conf.
E.g.:
PerlSetVar WhatEverRequiresEncoding UTF-8
view all matches for this distribution
view release on metacpan or search on metacpan
alive request.
0.15 9. Apr 2002
- Added patch from Brian Paulsen which causes correct handling of
non unicode charset (needed for some versions of win9x) and
more verbose debugging output (decoded flags)
0.14 26. Feb 2002
- fixed a problem that page content of Perl sometimes goes to the
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/AxKit/Language/LibXSLTEnhanced.pm view on Meta::CPAN
if ($last_in_chain) {
AxKit::Debug(8, "[LibXSLT] outputting to \$r");
if ($XML::LibXSLT::VERSION >= 1.03) {
my $encoding = $stylesheet->output_encoding;
my $type = $stylesheet->media_type;
$r->content_type("$type; charset=$encoding");
}
$stylesheet->output_fh($results, $r);
}
AxKit::Debug(7, "[LibXSLT] storing results in pnotes(dom_tree) ($r)");
view all matches for this distribution
view release on metacpan or search on metacpan
=item * accept
=item * content-type
=item * accept-charset
=item * accept-encoding
=item * accept-language
view all matches for this distribution
view release on metacpan or search on metacpan
dtds/dialog.dtd view on Meta::CPAN
dlg:font-name CDATA #IMPLIED
dlg:font-height %numeric; #IMPLIED
dlg:font-width %numeric; #IMPLIED
dlg:font-stylename CDATA #IMPLIED
dlg:font-family (decorative|modern|roman|script|swiss|system) #IMPLIED
dlg:font-charset (ansi|mac|ibmpc_437|ibmpc_850|ibmpc_860|ibmpc_861|ibmpc_863|ibmpc_865|system|symbol) #IMPLIED
dlg:font-pitch (fixed|variable) #IMPLIED
dlg:font-charwidth %numeric; #IMPLIED
dlg:font-weight %numeric; #IMPLIED
dlg:font-slant (oblique|italic|reverse_oblique|reverse_italic) #IMPLIED
dlg:font-underline (single|double|dotted|dash|longdash|dashdot|dashdotdot|smallwave|wave|doublewave|bold|bolddotted|bolddash|boldlongdash|bolddashdot|bolddashdotdot|boldwave) #IMPLIED
view all matches for this distribution
view release on metacpan or search on metacpan
templates/lightblue/entry-template.html view on Meta::CPAN
<html>
<head>
<title>my diary...</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body { background-color: #99CCFF; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px}
.lightblue { background-color: #D2E9FF; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; border: 1px #999999 dashed; text-align: justify; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px}
-->
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/ClearSilver.pm view on Meta::CPAN
# set various configuration options, e.g.
HDFLoadPath /path/to/loadpath /path/to/anotherpath
HDFFile /path/to/mydata.hdf /path/to/mydata2.hdf
HDFSetValue Foo bar
CSContentType "text/html; charset=utf-8"
# now define Apache::Clearsilver as a PerlHandler, e.g.
<Files *.cs>
SetHandler perl-script
PerlHandler Apache::Template
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Config/Preproc/ifmodule.pm view on Meta::CPAN
'mod_cache_disk.c' => 'cache_disk_module',
'mod_cache_socache.c' => 'cache_socache_module',
'mod_cern_meta.c' => 'cern_meta_module',
'mod_cgi.c' => 'cgi_module',
'mod_cgid.c' => 'cgid_module',
'mod_charset_lite.c' => 'charset_lite_module',
'mod_data.c' => 'data_module',
'mod_dav.c' => 'dav_module',
'mod_dav_fs.c' => 'dav_fs_module',
'mod_dav_lock.c' => 'dav_lock_module',
'mod_dbd.c' => 'dbd_module',
view all matches for this distribution
view release on metacpan or search on metacpan
t/httpd02.answer view on Meta::CPAN
reference 1-1-2-123-2-10 Apache::ConfigParser::Directive=HASH key 'line_number'
'914'
reference 1-1-2-123-2-10 Apache::ConfigParser::Directive=HASH key 'mother'
SEEN reference 1-1-2-122 Apache::ConfigParser::Directive=HASH
reference 1-1-2-123-2-10 Apache::ConfigParser::Directive=HASH key 'name'
'addcharset'
reference 1-1-2-123-2-10 Apache::ConfigParser::Directive=HASH key 'orig_value'
'ISO-8859-8 .iso8859-8'
reference 1-1-2-123-2-10 Apache::ConfigParser::Directive=HASH key 'orig_value_array'
reference 1-1-2-123-2-11-2 ARRAY with 2 elements
reference 1-1-2-123-2-11-2 ARRAY index 0
t/httpd02.answer view on Meta::CPAN
reference 1-1-2-123-2-13 Apache::ConfigParser::Directive=HASH key 'line_number'
'917'
reference 1-1-2-123-2-13 Apache::ConfigParser::Directive=HASH key 'mother'
SEEN reference 1-1-2-122 Apache::ConfigParser::Directive=HASH
reference 1-1-2-123-2-13 Apache::ConfigParser::Directive=HASH key 'name'
'addcharset'
reference 1-1-2-123-2-13 Apache::ConfigParser::Directive=HASH key 'orig_value'
'ISO-2022-JP .jis'
reference 1-1-2-123-2-13 Apache::ConfigParser::Directive=HASH key 'orig_value_array'
reference 1-1-2-123-2-14-2 ARRAY with 2 elements
reference 1-1-2-123-2-14-2 ARRAY index 0
t/httpd02.answer view on Meta::CPAN
reference 1-1-2-123-2-15 Apache::ConfigParser::Directive=HASH key 'line_number'
'919'
reference 1-1-2-123-2-15 Apache::ConfigParser::Directive=HASH key 'mother'
SEEN reference 1-1-2-122 Apache::ConfigParser::Directive=HASH
reference 1-1-2-123-2-15 Apache::ConfigParser::Directive=HASH key 'name'
'addcharset'
reference 1-1-2-123-2-15 Apache::ConfigParser::Directive=HASH key 'orig_value'
'ISO-2022-KR .iso-kr'
reference 1-1-2-123-2-15 Apache::ConfigParser::Directive=HASH key 'orig_value_array'
reference 1-1-2-123-2-16-2 ARRAY with 2 elements
reference 1-1-2-123-2-16-2 ARRAY index 0
t/httpd02.answer view on Meta::CPAN
reference 1-1-2-123-2-18 Apache::ConfigParser::Directive=HASH key 'line_number'
'922'
reference 1-1-2-123-2-18 Apache::ConfigParser::Directive=HASH key 'mother'
SEEN reference 1-1-2-122 Apache::ConfigParser::Directive=HASH
reference 1-1-2-123-2-18 Apache::ConfigParser::Directive=HASH key 'name'
'addcharset'
reference 1-1-2-123-2-18 Apache::ConfigParser::Directive=HASH key 'orig_value'
'ISO-8859-2 .iso-pl'
reference 1-1-2-123-2-18 Apache::ConfigParser::Directive=HASH key 'orig_value_array'
reference 1-1-2-123-2-19-2 ARRAY with 2 elements
reference 1-1-2-123-2-19-2 ARRAY index 0
t/httpd02.answer view on Meta::CPAN
reference 1-1-2-123-2-29 Apache::ConfigParser::Directive=HASH key 'line_number'
'933'
reference 1-1-2-123-2-29 Apache::ConfigParser::Directive=HASH key 'mother'
SEEN reference 1-1-2-122 Apache::ConfigParser::Directive=HASH
reference 1-1-2-123-2-29 Apache::ConfigParser::Directive=HASH key 'name'
'addcharset'
reference 1-1-2-123-2-29 Apache::ConfigParser::Directive=HASH key 'orig_value'
'Big5 .Big5 .big5'
reference 1-1-2-123-2-29 Apache::ConfigParser::Directive=HASH key 'orig_value_array'
reference 1-1-2-123-2-30-2 ARRAY with 3 elements
reference 1-1-2-123-2-30-2 ARRAY index 0
t/httpd02.answer view on Meta::CPAN
reference 1-1-2-123-2-30 Apache::ConfigParser::Directive=HASH key 'line_number'
'934'
reference 1-1-2-123-2-30 Apache::ConfigParser::Directive=HASH key 'mother'
SEEN reference 1-1-2-122 Apache::ConfigParser::Directive=HASH
reference 1-1-2-123-2-30 Apache::ConfigParser::Directive=HASH key 'name'
'addcharset'
reference 1-1-2-123-2-30 Apache::ConfigParser::Directive=HASH key 'orig_value'
'WINDOWS-1251 .cp-1251'
reference 1-1-2-123-2-30 Apache::ConfigParser::Directive=HASH key 'orig_value_array'
reference 1-1-2-123-2-31-2 ARRAY with 2 elements
reference 1-1-2-123-2-31-2 ARRAY index 0
t/httpd02.answer view on Meta::CPAN
reference 1-1-2-123-2-31 Apache::ConfigParser::Directive=HASH key 'line_number'
'935'
reference 1-1-2-123-2-31 Apache::ConfigParser::Directive=HASH key 'mother'
SEEN reference 1-1-2-122 Apache::ConfigParser::Directive=HASH
reference 1-1-2-123-2-31 Apache::ConfigParser::Directive=HASH key 'name'
'addcharset'
reference 1-1-2-123-2-31 Apache::ConfigParser::Directive=HASH key 'orig_value'
'CP866 .cp866'
reference 1-1-2-123-2-31 Apache::ConfigParser::Directive=HASH key 'orig_value_array'
reference 1-1-2-123-2-32-2 ARRAY with 2 elements
reference 1-1-2-123-2-32-2 ARRAY index 0
t/httpd02.answer view on Meta::CPAN
reference 1-1-2-123-2-32 Apache::ConfigParser::Directive=HASH key 'line_number'
'936'
reference 1-1-2-123-2-32 Apache::ConfigParser::Directive=HASH key 'mother'
SEEN reference 1-1-2-122 Apache::ConfigParser::Directive=HASH
reference 1-1-2-123-2-32 Apache::ConfigParser::Directive=HASH key 'name'
'addcharset'
reference 1-1-2-123-2-32 Apache::ConfigParser::Directive=HASH key 'orig_value'
'ISO-8859-5 .iso-ru'
reference 1-1-2-123-2-32 Apache::ConfigParser::Directive=HASH key 'orig_value_array'
reference 1-1-2-123-2-33-2 ARRAY with 2 elements
reference 1-1-2-123-2-33-2 ARRAY index 0
t/httpd02.answer view on Meta::CPAN
reference 1-1-2-123-2-33 Apache::ConfigParser::Directive=HASH key 'line_number'
'937'
reference 1-1-2-123-2-33 Apache::ConfigParser::Directive=HASH key 'mother'
SEEN reference 1-1-2-122 Apache::ConfigParser::Directive=HASH
reference 1-1-2-123-2-33 Apache::ConfigParser::Directive=HASH key 'name'
'addcharset'
reference 1-1-2-123-2-33 Apache::ConfigParser::Directive=HASH key 'orig_value'
'KOI8-R .koi8-r'
reference 1-1-2-123-2-33 Apache::ConfigParser::Directive=HASH key 'orig_value_array'
reference 1-1-2-123-2-34-2 ARRAY with 2 elements
reference 1-1-2-123-2-34-2 ARRAY index 0
t/httpd02.answer view on Meta::CPAN
reference 1-1-2-123-2-34 Apache::ConfigParser::Directive=HASH key 'line_number'
'938'
reference 1-1-2-123-2-34 Apache::ConfigParser::Directive=HASH key 'mother'
SEEN reference 1-1-2-122 Apache::ConfigParser::Directive=HASH
reference 1-1-2-123-2-34 Apache::ConfigParser::Directive=HASH key 'name'
'addcharset'
reference 1-1-2-123-2-34 Apache::ConfigParser::Directive=HASH key 'orig_value'
'UCS-2 .ucs2'
reference 1-1-2-123-2-34 Apache::ConfigParser::Directive=HASH key 'orig_value_array'
reference 1-1-2-123-2-35-2 ARRAY with 2 elements
reference 1-1-2-123-2-35-2 ARRAY index 0
t/httpd02.answer view on Meta::CPAN
reference 1-1-2-123-2-35 Apache::ConfigParser::Directive=HASH key 'line_number'
'939'
reference 1-1-2-123-2-35 Apache::ConfigParser::Directive=HASH key 'mother'
SEEN reference 1-1-2-122 Apache::ConfigParser::Directive=HASH
reference 1-1-2-123-2-35 Apache::ConfigParser::Directive=HASH key 'name'
'addcharset'
reference 1-1-2-123-2-35 Apache::ConfigParser::Directive=HASH key 'orig_value'
'UCS-4 .ucs4'
reference 1-1-2-123-2-35 Apache::ConfigParser::Directive=HASH key 'orig_value_array'
reference 1-1-2-123-2-36-2 ARRAY with 2 elements
reference 1-1-2-123-2-36-2 ARRAY index 0
t/httpd02.answer view on Meta::CPAN
reference 1-1-2-123-2-36 Apache::ConfigParser::Directive=HASH key 'line_number'
'940'
reference 1-1-2-123-2-36 Apache::ConfigParser::Directive=HASH key 'mother'
SEEN reference 1-1-2-122 Apache::ConfigParser::Directive=HASH
reference 1-1-2-123-2-36 Apache::ConfigParser::Directive=HASH key 'name'
'addcharset'
reference 1-1-2-123-2-36 Apache::ConfigParser::Directive=HASH key 'orig_value'
'UTF-8 .utf8'
reference 1-1-2-123-2-36 Apache::ConfigParser::Directive=HASH key 'orig_value_array'
reference 1-1-2-123-2-37-2 ARRAY with 2 elements
reference 1-1-2-123-2-37-2 ARRAY index 0
view all matches for this distribution
view release on metacpan or search on metacpan
mod_dav-1.0.3.patch view on Meta::CPAN
-#define DAV_VERSION "1.0.3"
+#define DAV_VERSION "1.0.4-dev"
#define DAV_XML_HEADER "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
#define DAV_XML_CONTENT_TYPE "text/xml; charset=\"utf-8\""
@@ -1804,6 +1804,15 @@
/* return the text for a given HTTP status code. */
const char * dav_lookup_status(int status);
+
view all matches for this distribution
view release on metacpan or search on metacpan
Apache-Test/lib/Apache/TestCharset.pm view on Meta::CPAN
use strict;
use Apache::DefaultCharset;
sub handler {
my $r = shift;
my $charset = Apache::DefaultCharset->new($r);
$r->send_http_header;
$r->print("charset:$charset\n");
$r->print("charset_r:", $r->add_default_charset_name, "\n");
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Defaults.pm view on Meta::CPAN
'mod_cache_disk.c' => 'cache_disk_module',
'mod_cache_socache.c' => 'cache_socache_module',
'mod_cern_meta.c' => 'cern_meta_module',
'mod_cgi.c' => 'cgi_module',
'mod_cgid.c' => 'cgid_module',
'mod_charset_lite.c' => 'charset_lite_module',
'mod_data.c' => 'data_module',
'mod_dav.c' => 'dav_module',
'mod_dav_fs.c' => 'dav_fs_module',
'mod_dav_lock.c' => 'dav_lock_module',
'mod_dbd.c' => 'dbd_module',
view all matches for this distribution
view release on metacpan or search on metacpan
Dynagzip.pm view on Meta::CPAN
C05 <-- S06 Server: Apache/1.3.22 (Unix) Debian GNU/Linux mod_perl/1.26
C05 <-- S06 X-Module-Sender: Apache::Dynagzip
C05 <-- S06 Transfer-Encoding: chunked
C05 <-- S06 Expires: Friday, 31-May-2002 17:41:57 GMT
C05 <-- S06 Vary: Accept-Encoding
C05 <-- S06 Content-Type: text/html; charset=iso-8859-1
C05 <-- S06 Content-Encoding: gzip
C05 <-- S06 == Incoming Body was 9411 bytes ==
== Transmission: text gzip chunked ==
== Chunk Log ==
a (hex) = 10 (dec)
Dynagzip.pm view on Meta::CPAN
C05 <-- S06 Server: Apache/1.3.22 (Unix) Debian GNU/Linux mod_perl/1.26
C05 <-- S06 X-Module-Sender: Apache::Dynagzip
C05 <-- S06 Transfer-Encoding: chunked
C05 <-- S06 Expires: Friday, 31-May-2002 17:54:06 GMT
C05 <-- S06 Vary: Accept-Encoding
C05 <-- S06 Content-Type: text/html; charset=iso-8859-1
C05 <-- S06 Content-Encoding: gzip
C05 <-- S06 == Incoming Body was 8515 bytes ==
== Transmission: text gzip chunked ==
== Chunk Log ==
a (hex) = 10 (dec)
Dynagzip.pm view on Meta::CPAN
C05 <-- S06 Server: Apache/1.3.22 (Unix) Debian GNU/Linux mod_perl/1.26
C05 <-- S06 X-Module-Sender: Apache::Dynagzip
C05 <-- S06 Transfer-Encoding: chunked
C05 <-- S06 Expires: Saturday, 01-June-2002 17:04:47 GMT
C05 <-- S06 Vary: Accept-Encoding
C05 <-- S06 Content-Type: text/html; charset=iso-8859-1
C05 <-- S06 Content-Encoding: gzip
C05 <-- S06 == Incoming Body was 758 bytes ==
== Transmission: text gzip chunked ==
== Chunk Log ==
a (hex) = 10 (dec)
Dynagzip.pm view on Meta::CPAN
C05 <-- S06 Server: Apache/1.3.22 (Unix) Debian GNU/Linux mod_perl/1.26
C05 <-- S06 X-Module-Sender: Apache::Dynagzip
C05 <-- S06 Transfer-Encoding: chunked
C05 <-- S06 Expires: Saturday, 01-June-2002 17:14:14 GMT
C05 <-- S06 Vary: Accept-Encoding
C05 <-- S06 Content-Type: text/html; charset=iso-8859-1
C05 <-- S06 Content-Encoding: gzip
C05 <-- S06 == Incoming Body was 750 bytes ==
== Transmission: text gzip chunked ==
== Chunk Log ==
a (hex) = 10 (dec)
Dynagzip.pm view on Meta::CPAN
C05 <-- S06 Server: Apache/1.3.22 (Unix) Debian GNU/Linux mod_perl/1.26
C05 <-- S06 X-Module-Sender: Apache::Dynagzip
C05 <-- S06 Transfer-Encoding: chunked
C05 <-- S06 Expires: Friday, 31-May-2002 23:23:17 GMT
C05 <-- S06 Vary: Accept-Encoding
C05 <-- S06 Content-Type: text/html; charset=iso-8859-1
C05 <-- S06 Content-Encoding: gzip
C05 <-- S06 == Incoming Body was 1002 bytes ==
== Transmission: text gzip chunked ==
== Chunk Log ==
a (hex) = 10 (dec)
Dynagzip.pm view on Meta::CPAN
C05 <-- S06 Server: Apache/1.3.22 (Unix) Debian GNU/Linux mod_perl/1.26
C05 <-- S06 X-Module-Sender: Apache::Dynagzip
C05 <-- S06 Transfer-Encoding: chunked
C05 <-- S06 Expires: Friday, 31-May-2002 23:42:45 GMT
C05 <-- S06 Vary: Accept-Encoding
C05 <-- S06 Content-Type: text/html; charset=iso-8859-1
C05 <-- S06 Content-Encoding: gzip
C05 <-- S06 == Incoming Body was 994 bytes ==
== Transmission: text gzip chunked ==
== Chunk Log ==
a (hex) = 10 (dec)
Dynagzip.pm view on Meta::CPAN
C05 <-- S06 HTTP/1.1 200 OK
C05 <-- S06 Date: Thu, 21 Feb 2002 20:01:47 GMT
C05 <-- S06 Server: Apache/1.3.22 (Unix) Debian GNU/Linux mod_perl/1.26
C05 <-- S06 Transfer-Encoding: chunked
C05 <-- S06 Vary: Accept-Encoding
C05 <-- S06 Content-Type: text/html; charset=iso-8859-1
C05 <-- S06 Content-Encoding: gzip
C05 <-- S06 == Incoming Body was 6034 bytes ==
== Transmission: text gzip chunked ==
== Chunk Log ==
a (hex) = 10 (dec)
Dynagzip.pm view on Meta::CPAN
C05 <-- S06 Server: Apache/1.3.22 (Unix) Debian GNU/Linux mod_perl/1.26
C05 <-- S06 X-Module-Sender: Apache::Dynagzip
C05 <-- S06 Expires: Sunday, 11-August-2002 21:33:43 GMT
C05 <-- S06 Vary: Accept-Encoding,*
C05 <-- S06 Transfer-Encoding: chunked
C05 <-- S06 Content-Type: text/html; charset=iso-8859-1
C05 <-- S06 Content-Encoding: gzip
C05 <-- S06 == Incoming Body was 11311 bytes ==
== Transmission: text gzip chunked ==
== Chunk Log ==
a (hex) = 10 (dec)
view all matches for this distribution
view release on metacpan or search on metacpan
ErrorControl.pm view on Meta::CPAN
}
# }}}
# Send Headers {{{
$r->content_type('text/html; charset=ISO-8859-1');
$r->send_http_header;
# }}}
# Send Template {{{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/FastForward.pm view on Meta::CPAN
# Contract:
# [1] Input: Encoding (if nothing defaults to UTF-8)
# [2] Output: returning success (1) or failure(0)
my $self = shift;
my $document_charset = shift;
$document_charset = 'UTF-8' unless defined( $document_charset );
resolve_alias( $document_charset ) or return 0;
$self->read( my $content, $self->header_in( 'Content-length' ) );
$content = decode( $document_charset, $content );
my ( @variable_names, $header_key );
my @lines = split( /\n/, $content );
for my $line ( @lines ){
view all matches for this distribution
view release on metacpan or search on metacpan
HanConvert.pm view on Meta::CPAN
my %encodings = (
'T' => 'HanConvertToEncodingTraditional',
'S' => 'HanConvertToEncodingSimplified',
);
my %charsets = (
'T' => qr{
big-?5 |
big5-?et(:en)? |
(?:tca|tw)[-_]?big5 |
big5-?hk(?:scs)? |
HanConvert.pm view on Meta::CPAN
if (!$to_encoding) {
my $chars = $r->headers_in->get('Accept-Charset');
$to_encoding = $1
if $chars =~ /\b($charsets{$to_variant})\b/i;
}
my $var_enc = $variants{"$from_variant$to_variant"} || 'utf8';
$from_encoding = Encode::resolve_alias($from_encoding) || 'utf8';
$to_encoding = Encode::resolve_alias($to_encoding) || 'utf8';
return Apache::DECLINED if $from_encoding eq $to_encoding
and $from_variant eq $to_variant;
my $charset = ($to_encoding eq 'utf8' ? 'utf-8' : $to_encoding);
$content_type =~ s/(?:;charset=[^;]+(.*))?$/;charset=$charset$1/;
$r->content_type($content_type);
my $c = $filter->c;
my $bb_ctx = APR::Brigade->new($c->pool, $c->bucket_alloc);
my $data = '';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/FilteringProxy.pm view on Meta::CPAN
my $val_ref = filter_data($r, \$value);
} elsif ($name =~ m/^content-type$/i) {
# here we are going to see if we need to translate any content-types
# since it is the easiest place to do it
my $content_type = "";
my $charset = "";
if (defined($value)) {
$content_type = $value;
if ($content_type =~ s/(;.*)//) {
$charset = $1;
}
}
$r->warn("determining if content-type '".$content_type."' needs to be translated...") unless ($Apache::FilteringProxy::logging < 1);
if (exists($Apache::FilteringProxy::type_translations{$content_type})) {
$r->warn("content-type '".$content_type."' needs to be translated") unless ($Apache::FilteringProxy::logging < 1);
if (defined($Apache::FilteringProxy::type_translations{$content_type})) {
$r->warn("caught and translated type '".$content_type.$charset."' to '".$Apache::FilteringProxy::type_translations{$content_type}.$charset."'") unless ($Apache::FilteringProxy::logging < 1);
$r->content_type($Apache::FilteringProxy::type_translations{$content_type}.$charset);
$value = $Apache::FilteringProxy::type_translations{$content_type}.$charset;
}
}
} elsif ($name =~ m/^set-cookie$/i) {
# set the domain for this cookie to our local domain so that we can
# intercept all these cookies and filter later
view all matches for this distribution
view release on metacpan or search on metacpan
templates/bright/layout.tpl view on Meta::CPAN
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>{ $TITLE }</title>
<link rel="stylesheet" href="/gallery.css" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
{ $META }
<!--[if gte IE 5.5000]>
<link rel="stylesheet" href="/galleryIE.css" type="text/css" />
<![endif]-->
</head>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/GuessCharset.pm view on Meta::CPAN
sub handler {
my $r = shift;
return DECLINED if
! $r->is_main or
$r->content_type !~ m@^text/@ or
$r->content_type =~ /charset=/ or
! -e $r->finfo or
-d _ or
!(my $chunk = read_chunk($r));
my @suspects = $r->dir_config->get('GuessCharsetSuspects');
lib/Apache/GuessCharset.pm view on Meta::CPAN
unless (ref $enc) {
warn "Couldn't guess encoding: $enc" if $DEBUG;
return DECLINED;
}
my $iana = iana_charset_name($enc->name);
my $charset = lc($Prefered_MIME{$iana} || $iana); # lowercased
warn "Guessed: $charset" if $DEBUG;
$r->content_type($r->content_type . "; charset=$charset");
return OK;
}
sub read_chunk {
my $r = shift;
lib/Apache/GuessCharset.pm view on Meta::CPAN
1;
__END__
=head1 NAME
Apache::GuessCharset - adds HTTP charset by guessing file's encoding
=head1 SYNOPSIS
SetHandler perl-script
PerlFixupHandler +Apache::GuessCharset
lib/Apache/GuessCharset.pm view on Meta::CPAN
PerlAddVar GuessCharsetSuspects 7bit-jis
=head1 DESCRIPTION
Apache::GuessCharset is an Apache fix-up handler which adds HTTP
charset attribute by automaticaly guessing text files' encodings via
Encode::Guess.
=head1 CONFIGURATION
This module uses following configuration variables.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/HeavyCGI.pm view on Meta::CPAN
sub finish {
my Apache::HeavyCGI $self = shift;
my $r = $self->{R};
my $content_type = "text/html";
$content_type .= "; charset=$self->{CHARSET}" if defined $self->{CHARSET};
$r->content_type($content_type);
eval { require Compress::Zlib; };
$self->{CAN_GZIP} = 0 if $@; # we cannot compress anyway :-)
lib/Apache/HeavyCGI.pm view on Meta::CPAN
Needs to be constructed and set by the user typically in the
contructor.
=item CHARSET
Optional attribute to denote the charset in which the outgoing data
are being encoded. Only used within the finish method. If it is set,
the finish() method will set the content type to text/html with this
charset.
=item CONTENT
Scalar that contains the content that should be sent to the user
uncompressed. During te finish() method the content may become
view all matches for this distribution
view release on metacpan or search on metacpan
t/htdocs/langprefcookie/foo/index.html.de view on Meta::CPAN
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15">
<title>Deutsch</title>
</head>
<body>
<h1>Deutsch</h1>
view all matches for this distribution
view release on metacpan or search on metacpan
Perl supports binary data in Perl strings, and the DBI will pass binary
data to and from the driver without change. It is up to the driver
implementors to decide how they wish to handle such binary data.
Most databases that understand multiple character sets have a
default global charset. Text stored in the database is, or should
be, stored in that charset; if not, then that's the fault of either
the database or the application that inserted the data. When text is
fetched it should be automatically converted to the charset of the
client, presumably based on the locale. If a driver needs to set a
flag to get that behaviour, then it should do so; it should not require
the application to do that.
Multiple SQL statements may not be combined in a single statement
view all matches for this distribution
view release on metacpan or search on metacpan
sub r { return shift->{r} }
sub html_content_type {
my $self = shift;
return 'text/html; charset=' . $self->lh->encoding
}
sub help_screen {
my $self = shift;
my $dir = shift;
my $title = $self->r->uri;
print start_html(
-title => $title,
-head => meta({-http_equiv => 'Content-Type',
-content => 'text/html; charset='
. $self->html_content_type
}),
-lang => $self->lh->language_tag,
-dir => $self->lh->direction,
-style => {-src=>$self->stylesheet},
view all matches for this distribution
view release on metacpan or search on metacpan
$r->notes('is_xml', 1);
$r->push_handlers('PerlFixupHandler',
sub {
my $r = shift;
$r->content_type("$type; charset=$encoding");
return OK;
});
}
return DECLINED;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/PageKit.pm view on Meta::CPAN
# see http://support.microsoft.com/support/kb/articles/Q234/0/67.ASP
# and http://www.pacificnet.net/~johnr/meta.html
my $browser_cache = $config->get_page_attr($page_id,'browser_cache') || $pk->{browser_cache} || 'yes';
$apr->header_out('Expires','-1') if $apr->param('pkit_logout') || $browser_cache eq 'no' || $apr->connection->user;
my $default_output_charset = $view->{default_output_charset};
my @charsets = ();
if($output_media eq 'text/html'){
# first get accepted charsets from incoming Accept-Charset HTTP header
if(my $accept_charset = $apr->headers_in->{'Accept-Charset'}){
my @quality = split(/\s*;\s*/, $accept_charset);
my @accept_charsets = split(/\s*,\s*/, shift @quality);
my $pos = 0;
for ( @accept_charsets ) {
s/^(iso|utf)/\U$1/;
s/^(us\-)?ascii/US-ASCII/;
$quality[$pos] =~ /^q=(\d+(?:\.\d+)?)/;
push @charsets, [ $_, $1 || '0.1', $pos++ ];
}
@charsets = sort {$b->[1] <=> $a->[1] || $a->[2] <=> $b->[2] } @charsets;
# set a content-type perhaps we overwrite this later if we know about the charset for the output pages
$apr->content_type("text/html");
}
} elsif ($output_media eq 'application/pdf'){
my $fop_command = $config->get_server_attr('fop_command')
lib/Apache/PageKit.pm view on Meta::CPAN
# call output filter, if applicable
$model->pkit_output_filter($output_ref)
if $model->can('pkit_output_filter');
my ( $converted_data, $retcharset );
if ($output_media eq 'text/html'){
my $data;
while (@charsets){
$retcharset = (shift @charsets)->[0];
last if ($retcharset eq $default_output_charset);
eval {
my $converter = Text::Iconv->new($default_output_charset, $retcharset);
$converted_data = $converter->convert($$output_ref);
};
last if ($converted_data);
$retcharset = undef;
}
## here no action is needed, if we did not convert the data to anything usefull.
## we deliver in our default_output_charset.
# correct the header
$apr->content_type("text/html; charset=$retcharset") if ($retcharset);
$apr->content_type("text/html; charset=$default_output_charset") unless ($retcharset);
}
# only pages with propper $retcharset are tranfered gzipped.
# this can maybe changed!? Needs some tests
my $send_gzipped = ( $retcharset && $pk->{use_gzip} eq 'all' );
$apr->content_encoding('gzip') if ($send_gzipped);
$apr->send_http_header if $apr->is_main;
lib/Apache/PageKit.pm view on Meta::CPAN
}
$self->{dbh} = $model->pkit_dbi_connect if $model->can('pkit_dbi_connect');
my $default_lang = $config->get_global_attr('default_lang') || 'en';
my $default_input_charset = $config->get_global_attr('default_input_charset') || 'ISO-8859-1';
my $default_output_charset = $config->get_global_attr('default_output_charset') || 'ISO-8859-1';
my $html_clean_level = $config->get_server_attr('html_clean_level') || 0;
my $can_edit = $config->get_server_attr('can_edit') || 'no';
my $reload = $config->get_server_attr('reload') || 'no';
my $cache_dir = $config->get_global_attr('cache_dir');
lib/Apache/PageKit.pm view on Meta::CPAN
root_dir => $pkit_root,
view_dir => "$pkit_root/View",
content_dir => "$pkit_root/Content",
cache_dir => $view_cache_dir,
default_lang => $default_lang,
default_input_charset => $default_input_charset,
default_output_charset => $default_output_charset,
reload => $reload,
html_clean_level => $html_clean_level,
input_param_object => $apr,
output_param_object => $self->{output_param_object},
can_edit => $can_edit,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/RSS/Encoding/JcodeUTF8.pm view on Meta::CPAN
RSSEncodeHandler Apache::RSS::Encoding::JcodeUTF8
=head1 DESCRIPTION
Apache::RSS HTML encoding Handler.
encode Japanese charset to UTF-8. using L<Jcode>.
=head1 AUTHOR
IKEBE Tomohiro E<lt>ikebe@edge.co.jpE<gt>
view all matches for this distribution
view release on metacpan or search on metacpan
my $SPACE = '\040';
my $CTL = '\000-\037\377';
my $especials = quotemeta '()<>@,;:\\"/[]?.=';
my $token = qr/ [^ $SPACE $CTL $especials ]+ /x;
my $charset = $token;
my $language = $token;
my $encoding = $token;
my $encoded_text = qr/ [ \041-\076 \100-\176 ]+ /x;
my $encoded_word = qr/ =\? $charset (?: \* $language )? \? $encoding \?
$encoded_text \?= /x;
sub _decode_value {
my ($self, $value) = @_;
my %args = map { defined $_ ? $_ : '' }
map Apache::unescape_url_info(defined $_ ? $_ : ''),
map /^([^=]*)(?:=(.*))?/,
split /[&;]+/ => $self->query_string;
# Extract the Content-Type charset for x-www-form-urlencoded
my ($is_urlenc, $charset);
my ($ctype) = split_header_words($self->header_in('Content-Type'));
if ($ctype->[0] && $ctype->[0] eq 'application/x-www-form-urlencoded') {
$is_urlenc = 1;
my %tmp = @$ctype;
$charset = $tmp{charset};
}
my $old_parms = $self->SUPER::parms;
my $new_parms = new Apache::Table $self, scalar keys %$old_parms;
# POSTed multipart/form-data form field names are supplied as
# a Content-Disposition parameter, so they are handled
# differently.
if ($is_urlenc || $args{$key}) {
$key = $self->_decode($key, $charset);
} else {
$key = $self->_decode_value($key);
}
# Same thing for filenames
if ($self->SUPER::upload($key)) {
$val = $self->_decode_value($val)
} else {
$val = $self->_decode($val, $charset);
}
$_ = $self->_encode($_) foreach $key, $val;
$new_parms->add($key, $val);
standard-compliant user-agent may be wrongly decoded.
=item *
When using the B<multipart/form-data> encoding, each form field value may have
its character encoding specified via the I<charset> parameter of its
I<Content-Type> header. This value is currently ignored. (This is due to a
limitation in I<libapreq>.)
Similarly, the I<Content-Transfer-Encoding> header is also ignored.
We should probably make _mangle_parms lazy, and only call it from param() and
such.
=item *
Automatically decode the contents of a B<text/*> file upload if a charset has
been provided.
=for comment
This should probably be optional, since we wouldn't know what to do with an
upload that doesn't have a charset. (Neither DECODE_PARMS nor the local
native charset would be appropriate here.) Besides, if ENCODE_PARMS was
defined, we'll still return a handle that spits out wide characters. (Come to
think of it, do any user-agents even bother providing a charset anyway?)
=item *
Allow for more than one DECODE_PARMS, and try to guess which one is
appropriate.
Write a short text about the various standards and issues.
=head1 SEE ALSO
<http://ppewww.ph.gla.ac.uk/~flavell/charset/form-i18n.html>
RFC 1522 - MIME (Multipurpose Internet Mail Extensions) Part Two: Message Header Extensions for Non-ASCII Text
RFC 1806 - Communicating Presentation Information in Internet Messages: The Content-Disposition Header [2.3]
RFC 1866 - Hypertext Markup Language - 2.0 [8.2.1]
RFC 1867 - Form-based File Upload in HTML [3.3, 5.11]
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/SWIT.pm view on Meta::CPAN
=head2 $class->swit_send_http_header($r, $ct)
Sends HTTP default headers: session cookie and content type. C<$r> is apache
request and C<$ct> is optional content type (defaults to
C<text/html; charset=utf-8>.
=cut
sub swit_send_http_header {
my ($class, $r, $ct) = @_;
$r->pnotes('SWITSession')->end;
$r->pnotes('SWITSession', undef);
$r->content_type($ct || "text/html; charset=utf-8");
}
=head2 $class->swit_die($msg, $r, @data_to_dump)
Dies with first line of C<$msg> using Carp::croak and dumps request C<$r> and
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/SdnFw.pm view on Meta::CPAN
$s->{r}{content} = <<END;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
$favicon
$s->{r}{head}
</head>
<body $s->{r}{body}>
$s->{r}{content}
view all matches for this distribution