view release on metacpan or search on metacpan
bin/tacochan view on Meta::CPAN
$message = $self->encoding->encode($message);
return $self->create_response(
$code,
[
'Content-Type' => 'text/plain; charset=utf-8',
'Content-Length' => length $message,
],
[$message]
);
}
bin/tacochan view on Meta::CPAN
@@ index.tt
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>tacochan</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/bootswatch/2.3.0/united/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="[% uri_for('/static/css/main.css') %]" />
bin/tacochan view on Meta::CPAN
<td class="name">url</td>
<td><code>[% c().req.base %]chat_list</code></td>
</tr>
<tr>
<td class="name">Content-Type</td>
<td><code>application/json; charset=utf-8</code></td>
</tr>
</table>
<p>Responds a list of recent chats as JSON (see below).</p>
<table class="table table-bordered">
<tr><td class="name">chatname : string</td><td colspan="2">chatname</td></tr>
bin/tacochan view on Meta::CPAN
<code>chat=skype:|user[, user, ...]</code>
</td>
</tr>
<tr>
<td class="name">Content-Type</td>
<td><code>text/plain; charset=utf-8</code></td>
</tr>
</table>
<p>Responds chat_id from Skype URI or username (chat_id is like this: <code>#anappo2/$d936403094338dbb</code>)</p>
</div>
</div>
view all matches for this distribution
view release on metacpan or search on metacpan
local/lib/perl5/Module/Build/Platform/VMS.pm view on Meta::CPAN
# Need to look up the EFS character set mode. This may become a dynamic
# mode in the future.
sub _efs {
my $efs;
if ($use_feature) {
$efs = VMS::Feature::current("efs_charset");
} else {
my $env_efs = $ENV{'DECC$EFS_CHARSET'} || '';
$efs = $env_efs =~ /^[ET1]/i;
}
return $efs;
view all matches for this distribution
view release on metacpan or search on metacpan
templates/html.html view on Meta::CPAN
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/html4.01-transitional.dtd">
<html>
<head>
<title>[% title %]</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="en-au">
<meta name="ROBOTS" content="INDEX,FOLLOW"/>
<meta name="author" content="[% contact.fullname %]">
<meta name="copyright" content="Copyright (c) [% year %] [% contact.fullname %], All Rights Reserved">
<meta name="description" content="">
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/TemplateServer.pm view on Meta::CPAN
sub _success {
my $content = shift;
my $headers = HTTP::Headers->new;
# set up utf8
$headers->header('content-type' => 'text/html; charset=utf8');
utf8::upgrade($content); # kill latin1
utf8::encode($content);
return HTTP::Response->new(200, 'OK', $headers, $content);
}
view all matches for this distribution
view release on metacpan or search on metacpan
examples/complex/input/jquery.min.js view on Meta::CPAN
/*! jQuery v1.8.3 jquery.com | jquery.org/license */
(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r=...
view all matches for this distribution
view release on metacpan or search on metacpan
script/term-terminfo view on Meta::CPAN
{ type => "str", value => "\e[C", var => "cursor_right" },
{ type => "str", value => "\e[A", var => "cursor_up" },
{ type => "str", value => "\e[?12;25h", var => "cursor_visible" },
{ type => "str", value => "\e[P", var => "delete_character" },
{ type => "str", value => "\e[M", var => "delete_line" },
{ type => "str", value => "\e(0", var => "enter_alt_charset_mode" },
{ type => "str", value => "\e[?7h", var => "enter_am_mode" },
{ type => "str", value => "\e[5m", var => "enter_blink_mode" },
{ type => "str", value => "\e[1m", var => "enter_bold_mode" },
{ type => "str", value => "\e[?1049h", var => "enter_ca_mode" },
{ type => "str", value => "\e[2m", var => "enter_dim_mode" },
script/term-terminfo view on Meta::CPAN
{ type => "str", value => "\e[7m", var => "enter_reverse_mode" },
{ type => "str", value => "\e[8m", var => "enter_secure_mode" },
{ type => "str", value => "\e[7m", var => "enter_standout_mode" },
{ type => "str", value => "\e[4m", var => "enter_underline_mode" },
{ type => "str", value => "\e[%p1%dX", var => "erase_chars" },
{ type => "str", value => "\e(B", var => "exit_alt_charset_mode" },
{ type => "str", value => "\e[?7l", var => "exit_am_mode" },
{ type => "str", value => "\e(B\e[m", var => "exit_attribute_mode" },
{ type => "str", value => "\e[?1049l", var => "exit_ca_mode" },
{ type => "str", value => "\e[4l", var => "exit_insert_mode" },
{ type => "str", value => "\e[23m", var => "exit_italics_mode" },
view all matches for this distribution
view release on metacpan or search on metacpan
bin/test-generator-index view on Meta::CPAN
sub _mutant_file_header {
return qq{
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
/* --------------------------------------------------
CSS Variables (Light Mode Default)
-------------------------------------------------- */
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/TimeClock/Daily/HtmlPrinter.pm view on Meta::CPAN
my $title = "Daily Report " . localtime();
$self->_print(<< "EOD");
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv='Content-Type' content='text/html;charset=utf-8'/><title>$title</title>
<style type='text/css'>
html, body { margin: 0; padding: 0; border: 0; }
body { background:#fff; color:#000; margin: 1em 0 0 1em; }
table { border-collapse: collapse; width: 80ex; }
th, td { margin:0; border:1px solid #000;padding:0.2em; }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Twimap/Tweet.pm view on Meta::CPAN
my @parts = (
Email::MIME->create(
attributes => {
content_type => "text/plain",
disposition => "inline",
charset => "utf-8",
},
header_str => [ Date => $date ],
body => $body_text,
),
Email::MIME->create(
attributes => {
content_type => "text/html",
disposition => "inline",
charset => "utf-8",
},
header_str => [ Date => $date ],
body => $body_html,
),
lib/App/Twimap/Tweet.pm view on Meta::CPAN
my $email = Email::MIME->create(
attributes => {
boundary => '1317546824.2C8b2BC51.4794',
content_type => "multipart/alternative",
charset => "utf-8",
},
header_str => \@headers,
parts => [@parts],
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/WRT.pm view on Meta::CPAN
Here's a short example:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>${title_prefix} - ${title}</title>
</head>
<body>
${content}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Web/VPKBuilder.pm view on Meta::CPAN
push @zip_files, catfile $dir, "pkg.$self->{cfg}{vpk_extension}"
} else {
find sub { push @zip_files, $File::Find::name if -f }, $dest;
}
zip \@zip_files, catfile($dir, 'pkg.zip'), FilterName => sub { $_ = abs2rel $_, $dir }, -Level => 1;
open my $fh, '<', catfile $dir, 'pkg.zip' or return [500, ['Content-Type' => 'text/plain;charset=utf-8'], ['Error opening pkg.zip']]; ## no critic (RequireBriefOpen)
remove_tree $dir;
[200, ['Content-Type' => 'application/zip', 'Content-Disposition' => 'attachment; filename=pkg.zip'], $fh]
}
sub makelist {
lib/App/Web/VPKBuilder.pm view on Meta::CPAN
}
my $html = HTML::TreeBuilder->new_from_file('index.html');
$self->makelist(scalar $html->look_down(id => 'list'), $tree, 1);
my $ret = $html->as_HTML('', ' ');
utf8::encode($ret);
[200, ['Content-Type' => 'text/html;charset=utf-8'], [$ret]]
}
sub call{
my ($self, $env) = @_;
my $req = Plack::Request->new($env);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Widget.pm view on Meta::CPAN
}
# URL-encode data
sub url_escape {
my $self = shift;
my ($toencode,$charset) = @_;
if ($charset) {
$toencode=~s/($charset)/uc sprintf("%%%02x",ord($1))/eg;
}
else {
$toencode=~s/([^a-zA-Z0-9_\-. ])/uc sprintf("%%%02x",ord($1))/eg;
$toencode =~ tr/ /+/; # spaces become pluses
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Zapzi/Articles.pm view on Meta::CPAN
my $id = shift;
my $rs = get_article($id);
return unless $rs;
my $html = sprintf("<html><head><meta charset=\"utf-8\">\n" .
"<title>%s</title></head><body>%s</body></html>\n",
$rs->title, $rs->article_text->text);
return $html;
}
view all matches for this distribution
view release on metacpan or search on metacpan
script/chinese-zodiac-of view on Meta::CPAN
#our $ROW_SEPARATOR = '-';
#our $CORNER_MARKER = '+';
#our $HEADER_ROW_SEPARATOR = '=';
#our $HEADER_CORNER_MARKER = 'O';
#
#my %charsets = (
# classic => { TLC => '+', TT => '+', TRC => '+', HR => '-', VR => '|', FHR => '=', LT => '+', RT => '+', FLT => 'O', FRT => 'O', HC => '+', FHC => 'O', BLC => '+', BT => '+', BRC => '+' },
# boxrule => { TLC => 'âÂÂ', TT => 'â¬', TRC => 'âÂÂ', HR => 'âÂÂ', VR => 'âÂÂ', FHR => 'âÂÂ', LT => 'âÂÂ', RT => 'â¤', FLT => 'âÂÂ', FRT => 'â¡', HC => 'â¼', FHC => 'âª', BLC => 'âÂÂ', BT => 'â´', B...
# norule => { TLC => ' ', TT => ' ', TRC => ' ', HR => ' ', VR => ' ', FHR => ' ', LT => ' ', RT => ' ', FLT => ' ', FRT => ' ', HC => ' ', FHC => ' ', BLC => ' ', BT => ' ', BRC => ' ' },
#);
#
script/chinese-zodiac-of view on Meta::CPAN
#
# $param{indent} //= '';
# $param{indent} = ' ' x $param{indent} if $param{indent} =~ /^[0-9]+$/;
#
# my $style = $param{style};
# croak "unknown style '$style'" if not exists($charsets{ $style });
# my $char = $charsets{$style};
#
# if ($style eq 'classic') {
# $char->{TLC} = $char->{TRC} = $char->{TT} = $char->{LT} = $char->{RT} = $char->{HC} = $char->{BLC} = $char->{BT} = $char->{BRC} = $CORNER_MARKER;
# $char->{HR} = $ROW_SEPARATOR;
# $char->{VR} = $COLUMN_SEPARATOR;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ZofCMS/Output.pm view on Meta::CPAN
my $self = shift;
my $query = $self->config->query;
if ( $query->{dir} eq '/' and $query->{page} eq '404' ) {
return $self->config->cgi->header('text/html','404 Not Found');
}
return $self->config->cgi->header( -type => 'text/html', -charset => 'utf-8' );
}
sub output {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
print "-> html_header\n" if $opt_v > 2;
return
'<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="GENERATOR" content="cloc http://github.com/AlDanial/cloc">
' .
"
<!-- Created by $script v$VERSION -->
<title>$title</title>
view all matches for this distribution
view release on metacpan or search on metacpan
docs/App-combinesheets.html view on Meta::CPAN
<html><head><title>App::combinesheets</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
BODY {
background: white;
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/build.fresh.log view on Meta::CPAN
t/headers-etag.t ........ ok
t/headers-auth.t ........ ok
t/common-req.t .......... ok
t/headers.t ............. ok
t/http-config.t ......... ok
t/message-charset.t ..... ok
t/message-decode-xml.t .. ok
t/message-old.t ......... ok
t/message-parts.t ....... ok
t/status-old.t .......... ok
t/status.t .............. ok
view all matches for this distribution
view release on metacpan or search on metacpan
bin/devmode view on Meta::CPAN
#termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
#terminfo xterm 'vb=\E[?5h$<200/>\E[?5l'
termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l'
# emulate part of the 'K' charset
termcapinfo xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337'
# xterm-52 tweaks:
# - uses background color for delete operations
termcapinfo xterm ut
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/docsisious/public/icons/flaticon.html view on Meta::CPAN
<html>
<head>
<title>Flaticon WebFont</title>
<link rel="stylesheet" type="text/css" href="flaticon.css">
<meta charset="UTF-8">
<style>
body {
font-family: sans-serif;
line-height: 1.5;
font-size: 16px;
view all matches for this distribution
view release on metacpan or search on metacpan
share/testpdljs.pl view on Meta::CPAN
__DATA__
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="copyright" content="App::financeta Authors">
<meta name="author" content="Vikas N Kumar <vikas@cpan.org>">
<meta name="description" content="App::financeta">
<link rel="icon" href="chart-line-solid.png" type="image/png">
view all matches for this distribution
view release on metacpan or search on metacpan
script/genpw-ind view on Meta::CPAN
# style => "styling of table, one of classic, boxrule, or norule",
# indent => "indent every row of the table a certain number of spaces",
# compact => "narrow columns (no space either side of content)",
#);
#
#my %charsets = (
# classic => { TLC => '+', TT => '+', TRC => '+', HR => '-', VR => '|', FHR => '=', LT => '+', RT => '+', FLT => 'O', FRT => 'O', HC => '+', FHC => 'O', BLC => '+', BT => '+', BRC => '+' },
# boxrule => { TLC => 'âÂÂ', TT => 'â¬', TRC => 'âÂÂ', HR => 'âÂÂ', VR => 'âÂÂ', FHR => 'âÂÂ', LT => 'âÂÂ', RT => 'â¤', FLT => 'âÂÂ', FRT => 'â¡', HC => 'â¼', FHC => 'âª', BLC => 'âÂÂ', BT => 'â´', B...
# norule => { TLC => ' ', TT => ' ', TRC => ' ', HR => ' ', VR => ' ', FHR => ' ', LT => ' ', RT => ' ', FLT => ' ', FRT => ' ', HC => ' ', FHC => ' ', BLC => ' ', BT => ' ', BRC => ' ' },
#);
#
script/genpw-ind view on Meta::CPAN
#
# $param{indent} //= '';
# $param{indent} = ' ' x $param{indent} if $param{indent} =~ /^[0-9]+$/;
#
# my $style = $param{style};
# croak "unknown style '$style'" if not exists($charsets{ $style });
# my $char = $charsets{$style};
#
# if ($style eq 'classic') {
# $char->{TLC} = $char->{TRC} = $char->{TT} = $char->{LT} = $char->{RT} = $char->{HC} = $char->{BLC} = $char->{BT} = $char->{BRC} = $CORNER_MARKER;
# $char->{HR} = $ROW_SEPARATOR;
# $char->{VR} = $COLUMN_SEPARATOR;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/FlashVideo/Mechanize.pm view on Meta::CPAN
}
sub update_html {
my($self, $html) = @_;
my $charset = _parse_charset($self->response->header("Content-type"));
# If we have no character set in the header (therefore it is worth looking
# for a http-equiv in the body) or the content hasn't been decoded (older
# versions of Mech).
if($LWP::UserAgent::VERSION < 5.827
&& (!$charset || !Encode::is_utf8($html))) {
# HTTP::Message helpfully decodes to iso-8859-1 by default. Therefore we
# do the inverse. This is fucking frail and will probably break.
$html = Encode::encode("iso-8859-1", $html) if Encode::is_utf8($html);
lib/FlashVideo/Mechanize.pm view on Meta::CPAN
if(!FlashVideo::Downloader->check_magic($html)) {
my $p = HTML::TokeParser->new(\$html);
while(my $token = $p->get_tag("meta")) {
my($tag, $attr) = @$token;
if($tag eq 'meta' && $attr->{"http-equiv"} =~ /Content-type/i) {
$charset ||= _parse_charset($attr->{content});
}
}
if($charset) {
eval { $html = Encode::decode($charset, $html) };
FlashVideo::Utils::error("Failed decoding as $charset: $@") if $@;
}
}
}
return $self->SUPER::update_html($html);
}
sub _parse_charset {
my($field) = @_;
return(($field =~ /;\s*charset=([-_.:a-z0-9]+)/i)[0]);
}
sub get_socks_proxy {
my $self = shift;
my $proxy = $self->proxy("http");
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ggdrv/update.pm view on Meta::CPAN
'Content-Type' => 'multipart/form-data',
Authorization => "Bearer $atoken" ,
Content => [
metadata => [
undef, undef, # undef => undef ã¨æ¸ããã¨ã¯åºæ¥ãã ããã?
'Content-Type' => 'application/json;charset=UTF-8',
'Content' => encode_json( {} ) #name=>'temp.txt', mimeType=>'text/plain', parents => ['10_33chars_in_total'], id => $target_fileid},
],
file => [ $_[0] ] #["./anotherName.txt"],
],
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/htidx.pm view on Meta::CPAN
$fh->say('<!doctype html>');
$fh->say(sprintf('<!-- %s -->', he(SIGNATURE)));
$fh->say($H->open('html', {lang => 'en'}));
$fh->say($H->head([
$H->meta({charset => 'UTF-8'}),
$H->title(he($title)),
$H->meta({name => 'generator', content => sprintf('%s v%s', __PACKAGE__, $VERSION)}),
$H->meta({name => 'viewport', content => 'width=device-width'}),
$H->style(he($CSS)),
]));
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/htmlcat.pm view on Meta::CPAN
my $remote_addr = $env->{REMOTE_ADDR};
my $writer = $respond->([
200, [
'Content-Type' => 'text/event-stream; charset=utf-8',
'Cache-Control' => 'no-cache'
]
]);
my $io = $env->{'psgix.io'};
lib/App/htmlcat.pm view on Meta::CPAN
} elsif ($env->{PATH_INFO} eq '/css') {
return [ 200, [ 'Content-Type' => 'text/css' ], [ $self->{ansi}->css ] ];
} elsif ($env->{PATH_INFO} eq '/js') {
return [ 200, [ 'Content-Type' => 'text/javascript' ], [ get_data_section('js') ] ];
} elsif ($env->{PATH_INFO} eq '/') {
return [ 200, [ 'Content-Type' => 'text/html; charset=utf-8' ], [ get_data_section('html') ] ];
} else {
return [ 404, [], [] ];
}
};
}
view all matches for this distribution
view release on metacpan or search on metacpan
share/template.html view on Meta::CPAN
% my ($globals, $feeds, $entries) = @_;
<!DOCTYPE html>
<html>
<head profile="http://www.w3.org/2005/10/profile">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="jupiter.png" type="image/png"/>
<link rel="icon" href="jupiter.png" type="image/png"/>
<link rel="stylesheet" href="default.css" type="text/css"/>
<title>Planet</title>
<meta name="robots" content="noindex,nofollow">
view all matches for this distribution
view release on metacpan or search on metacpan
longer served as text/gemini, you need to use .gmi, or some other
file extension File::MimeInfo doesn't know about)
- new dependency: File::MimeInfo
- use --text_encoding=euc-jp to override UTF-8 charset for all text
files (all "text" types)
1.04
- Should work for more than one file, now! ð
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/mailmake view on Meta::CPAN
plain_file => { type => 'file' }, # plain-text body from file
html => { type => 'string' }, # HTML body (literal)
html_file => { type => 'file' }, # HTML body from file
attach => { type => 'file-array' }, # file attachments
attach_inline => { type => 'file-array' }, # inline (related) parts
charset => { type => 'string', default => 'UTF-8' },
# Output - print to stdout instead of sending
print => { type => 'boolean', default => 0 },
# SMTP delivery
scripts/mailmake view on Meta::CPAN
}
}
}
# Body
my $charset = $opts->{charset} // 'UTF-8';
if( $opts->{plain_file} )
{
my $f = $opts->{plain_file};
_die( "plain-file \"$f\" does not exist." ) unless( $f->exists );
my $text = $f->load_utf8 ||
_die( "Cannot read plain-file \"$f\": ", $f->error );
$mail->plain( $text, charset => $charset ) || _die( $mail->error );
}
elsif( defined( $opts->{plain} ) && length( $opts->{plain} // '' ) )
{
_message( 3, "Setting body to '", $opts->{plain}, "'" );
$mail->plain( $opts->{plain}, charset => $charset ) ||
_die( "Error setting plain body: ", $mail->error );
}
if( $opts->{html_file} )
{
my $f = $opts->{html_file};
_die( "html-file \"$f\" does not exist." ) unless( $f->exists );
my $html = $f->load_utf8 ||
_die( "Cannot read html-file \"$f\": ", $f->error );
$mail->html( $html, charset => $charset ) || _die( $mail->error );
}
elsif( defined( $opts->{html} ) && length( $opts->{html} // '' ) )
{
$mail->html( $opts->{html}, charset => $charset ) || _die( $mail->error );
}
if( $opts->{attach} && @{$opts->{attach}} )
{
_message( 3, "Processing ", scalar( @{$opts->{attach}} ), " attachments." );
scripts/mailmake view on Meta::CPAN
=item B<--attach-inline> FILE [FILE ...]
Inline attachment(s), added as C<multipart/related> parts, intended for embedding images in HTML (repeatable).
=item B<--charset> NAME
Character set for text bodies. Default: C<UTF-8>.
=back
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/md2html.pm view on Meta::CPAN
use IPC::Nosh::Common;
const our $CHARSET_DEFAULT => 'UTF-8';
const our %HTMLOPT_DEFAULT => (
doctype => '<!DOCTYPE html>',
head => [ '<head>', qq!<meta charset="$CHARSET_DEFAULT">!, '</head>' ]
);
field $embedded : param : accessor //=
first { $_ } @ENV{ ( map { "MD2HTML_$_" } qw'EMBEDDED FRAGMENT' ) };
view all matches for this distribution