- if (defined $mnem) {
- push @class, 'di-d'; # digraph
- push @class, 'di-prop' if $class =~ /\bXz\b/; # unofficial
+ if ($self->{digraph}) {
+ if (defined $mnem) {
+ push @class, $class =~ /\bXz\b/ ? ('l2', 'u-prop') # unofficial
+ : ('l3', 'u-di'); # standard digraph
+ }
+ }
+ else {
+ my $codepoint = ord(substr $input, 0, 1);
+ if ($codepoint <= 0xFF) {
+ push @class, 'l3', 'u-lat1'; # latin1
+ }
+ elsif ($codepoint <= 0xD7FF) {
+ push @class, 'l2', 'u-bmp'; # bmp
+ }