- $mnem =~ s{<([^>]+)> \h?}{$symname->{$1} // die "reference to unknown keysym $1\n"}eg;
- $mnem !~ m/[^\x20-\x7F]/ or next; # skip unicode
-# (state $seen = {})->{$chr}++ and next;
- printf "%s => %s,\n", pp($mnem), pp($chr);
+ eval {
+ $mnem =~ s{<([^>]+)> \h?}{$symname->{$1} // die "reference to unknown keysym $1\n"}eg;
+ 1;
+ } or warn($@), next;
+ $mnem =~ m/\A [\x20-\x7F]{2} \z/ or next; # only interested in two ascii
+ my $alias = (state $seen = {})->{$chr}++; # assume first is preferred
+ $table{$mnem} = [
+ ord $chr,
+ $uninfo->{$chr}->[1] // '', # name
+ 0, # comparison
+ $alias ? 'l0 ex' :
+ ($uninfo->{$chr}->[0] // '') =~ s/ u-di| u-prop| ex//gr, # class
+ $uninfo->{$chr}->[4] // (), # string
+ ];