- my $class = shift;
-
- my $ascii = undef;
- if (exists $PLP::Script::get{ascii}) {
- # manual override
- $ascii = !defined $PLP::Script::get{ascii} || $PLP::Script::get{ascii} !~ /^0*$/;
- }
- elsif (defined $ENV{HTTP_ACCEPT_CHARSET}) {
- $ascii = 1;
- for (split q{,}, $ENV{HTTP_ACCEPT_CHARSET}) {
- $ascii = undef, last if $_ eq '*' or m{utf-?8}i;
- }
- }
-
- my %sign = (
- -ascii => $ascii,
- charset=> $ascii ? 'us-ascii' : 'utf-8',
- arg => $ascii ? '.' : '·', # described as 'dot'
- args => $ascii ? ':' : '⁚',
- argi => $ascii ? "'" : '′',
- argm => $ascii ? '|' : '↕',
- motion => $ascii ? '|' : '↕',
- alias => $ascii ? 'see: ' : '»',
- up => $ascii ? 'up' : '▲',
- right => $ascii ? 'right' : '▶',
- down => $ascii ? 'down' : '▼',
- left => $ascii ? 'left' : '◀',
- sep => $ascii ? '*' : '•',
- _ => defined $ascii && !$ascii ? "\x{200b}" : '<wbr>',
- # use the correct ZWNJ only when unicode is forced on
- # default to use unofficial html for best support
- );
-