#!/bin/bash # disable local::lib unset PERL5LIB # use a specific (newer) version of Perl exec ~/perl5/perlbrew/perls/perl-5.12.4/bin/perl -x "$0" exit #!perl # generates the HTML for my chars-grid page # http://paperlined.org/cgi-bin/tmp/gen_chars.cgi # http://paperlined.org/chars/ use strict; use warnings; use utf8; use CGI; use charnames ':full'; use Unicode::UCD; use CGI::Util; # re-enable local::lib use lib "$ENV{HOME}/perl5/lib/perl5"; use local::lib; use HTML::HTML5::Entities; #use CGI::Carp qw(fatalsToBrowser); # if running as CGI #use CGI::Debug; # if running as CGI #use autodie; #use Carp::Always; use Data::Dumper; #use Devel::Comments; # uncomment this during development to enable the ### debugging statements my $fout; if (-t STDOUT) { open $fout, '>:utf8', '/home/interiot/public_html/chars/index.html' or die $!; } else { open $fout, '>&STDOUT' or die $!; binmode $fout, ':utf8'; print $fout "Content-type: text/html; charset=utf-8\n\n"; } header(); while (defined(my $line = )) { #s/($unicode_block"; } my $unicode_category = Unicode::UCD::charinfo(ord($char)) || ''; if($unicode_category) { $unicode_category = $unicode_category->{category}; my $category_url = "http://www.fileformat.info/info/unicode/category/$unicode_category/list.htm"; my $category_name = Unicode::UCD::general_categories()->{$unicode_category}; $unicode_category = "$category_name"; } my $charnum = sprintf("%x", ord($char)); my $descr = "
$char
" . (charnames::viacode(ord($char)) || '') . "
$html_entity
$unicode_block
$unicode_category
"; (my $hidden_but_searchable = $descr) =~ s/<.*?>/ /sg; $descr = CGI::Util::simple_escape($descr); $descr =~ s/'//g; #print $fout return "
$hidden_but_searchable
$char
\n"; } sub header { print $fout <<'EOF'; Unicode characters EOF } # the "data" section is the template for creating the page __DATA__

Unicode characters I frequently cut-n-paste.

— §

← ⇐ → ⇒

† ‡

superscript: ⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁻

subscript: ₀ ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉ ₋

fractions: ½ ¼ ¾ ⅓ ⅔ ⅛ ⅜ ⅝ ⅞

math: ≠ ± ° ∞ × · ∑ ∫ ∬ ≈

greek: Δ θ λ μ ω

box drawing:

just for fun: ☃ ☠ ⍨ ☔ ☕ ⚰

Unicode v6.*, stuff you're unlikely to see in the wild: 💩 🌃 🌄 🌉 🌞 🏩 👙



Ctrl-F to search for a character. <Escape> to clear things from the screen.

If you can't find your character, search here, here, here or here, or draw here.

Source code here.