File: _Compat.pm

package info (click to toggle)
movabletype-opensource 4.2.3-1%2Blenny3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 21,268 kB
  • ctags: 15,862
  • sloc: perl: 178,892; php: 26,178; sh: 161; makefile: 82
file content (35 lines) | stat: -rw-r--r-- 577 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

package MIME::Charset::_Compat;
use 5.004;

use strict;

use vars qw($VERSION);

$VERSION = "0.04";

sub FB_CROAK { 1; }
sub FB_PERLQQ { 100; }
sub FB_HTMLCREF { 200; }
sub FB_XMLCREF { 400; }
sub encode { $_[1]; }
sub decode { $_[1]; }
sub from_to {
    if ((lc($_[2]) eq "us-ascii" or lc($_[1]) eq "us-ascii") and
	$_[0] =~ s/[^\x01-\x7e]/?/g and $_[3] == 1) {
	die "Non-ASCII characters";
    }
    $_[0];
}
sub is_utf8 { 0; }
sub resolve_alias {
    my $cset = lc(shift);
    if ($cset eq "8bit" or $cset !~ /\S/) {
	return undef;
    } else {
	return $cset;
    }
}

1;