From caf3ebb31d9278970cf78bdcc80e98f0f320c121 Mon Sep 17 00:00:00 2001 From: Daniel Ehrenberg Date: Thu, 27 Mar 2008 00:32:41 -0400 Subject: [PATCH] Fixing 8-bit encodings --- extra/io/encodings/8-bit/8-bit.factor | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/extra/io/encodings/8-bit/8-bit.factor b/extra/io/encodings/8-bit/8-bit.factor index 2e33075df0..d29760a3e0 100644 --- a/extra/io/encodings/8-bit/8-bit.factor +++ b/extra/io/encodings/8-bit/8-bit.factor @@ -3,7 +3,7 @@ USING: math.parser arrays io.encodings sequences kernel assocs hashtables io.encodings.ascii combinators.cleave generic parser tuples words io io.files splitting namespaces -classes quotations math compiler.units accessors ; +math compiler.units accessors ; IN: io.encodings.8-bit ] map ] map ; + [ "\t" split 2 head [ 2 tail-if hex> ] map ] map ; : byte>ch ( assoc -- array ) 256 replacement-char @@ -77,4 +77,8 @@ M: 8-bit decode-char PRIVATE> -[ mappings [ full-path define-8-bit-encoding ] assoc-each ] with-compilation-unit +[ + "io.encodings.8-bit" in [ + mappings [ full-path define-8-bit-encoding ] assoc-each + ] with-variable +] with-compilation-unit