 : decode-quad ( byte-array -- char )
     dup mapping value-at [ ] [
         linear dup gb>u interval-at [
-            [ bfirst>> linear - ] [ ufirst>> ] bi +
+            [ bfirst>> - ] [ ufirst>> ] bi +
         ] [ drop replacement-char ] if*
     ] ?if ;
 

        {
            [ "uFirst" attr hex> ]
            [ "uLast" attr hex> ]
            [ "bFirst" attr b>byte-array ]
            [ "bLast" attr b>byte-array ]
        } cleave range boa
    ] dip push ;


    [ ufirst>> ] [ ulast>> ] [ ] >interval-map-by ;

: ranges-gb>u ( ranges -- interval-map )
    [ bfirst>> ] [ blast>> ] [ ] >interval-map-by ;

VALUE: gb>u
VALUE: u>gb
