]> gitweb.factorcode.org Git - factor.git/commitdiff
UNICHAR => CHAR
authorDaniel Ehrenberg <ehrenbed@carleton.edu>
Sat, 16 Feb 2008 01:51:12 +0000 (19:51 -0600)
committerDaniel Ehrenberg <ehrenbed@carleton.edu>
Sat, 16 Feb 2008 01:51:12 +0000 (19:51 -0600)
core/io/encodings/encodings.factor
core/io/encodings/utf16/utf16-tests.factor
core/io/encodings/utf8/utf8-tests.factor

index 27c74fc4bdad052374f66b00a1cf69ce683da262..94a5bf8853f917fc5844d73e7cfc703ed3ace15c 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2006, 2007 Daniel Ehrenberg.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: math kernel sequences sbufs vectors io.streams.lines io.streams.plain
-namespaces unicode.syntax growable strings io classes io.streams.c
+namespaces unicode growable strings io classes io.streams.c
 continuations ;
 IN: io.encodings
 
@@ -19,7 +19,7 @@ SYMBOL: begin
     over push 0 begin ;
 
 : push-replacement ( buf -- buf ch state )
-    UNICHAR: replacement-character decoded ;
+    CHAR: replacement-character decoded ;
 
 : finish-decoding ( buf ch state -- str )
     begin eq? [ decode-error ] unless drop "" like ;
index 9800a9827dc5808d99e87c33aca21b30615b5c4b..d1817db1e8a3562fe3e22b33257592c0dde22ff4 100755 (executable)
@@ -1,15 +1,15 @@
-USING: tools.test io.utf16 arrays unicode.syntax ;
+USING: tools.test io.utf16 arrays unicode ;
 
 [ { CHAR: x } ] [ { 0 CHAR: x } decode-utf16be >array ] unit-test
 [ { HEX: 1D11E } ] [ { HEX: D8 HEX: 34 HEX: DD HEX: 1E } decode-utf16be >array ] unit-test
-[ { UNICHAR: replacement-character } ] [ { BIN: 11011111 CHAR: q } decode-utf16be >array ] unit-test
-[ { UNICHAR: replacement-character } ] [ { BIN: 11011011 CHAR: x BIN: 11011011 CHAR: x } decode-utf16be >array ] unit-test
+[ { CHAR: replacement-character } ] [ { BIN: 11011111 CHAR: q } decode-utf16be >array ] unit-test
+[ { CHAR: replacement-character } ] [ { BIN: 11011011 CHAR: x BIN: 11011011 CHAR: x } decode-utf16be >array ] unit-test
 
 [ B{ 0 120 216 52 221 30 } ] [ { CHAR: x HEX: 1d11e } encode-utf16be ] unit-test
 
 [ { CHAR: x } ] [ { CHAR: x 0 } decode-utf16le >array ] unit-test
 [ { 119070 } ] [ { HEX: 34 HEX: D8 HEX: 1E HEX: DD } decode-utf16le >array ] unit-test
-[ { UNICHAR: replacement-character } ] [ { 0 BIN: 11011111 } decode-utf16le >array ] unit-test
-[ { UNICHAR: replacement-character } ] [ { 0 BIN: 11011011 0 0 } decode-utf16le >array ] unit-test
+[ { CHAR: replacement-character } ] [ { 0 BIN: 11011111 } decode-utf16le >array ] unit-test
+[ { CHAR: replacement-character } ] [ { 0 BIN: 11011011 0 0 } decode-utf16le >array ] unit-test
 
 [ B{ 120 0 52 216 30 221 } ] [ { CHAR: x HEX: 1d11e } encode-utf16le ] unit-test
index 33c4ffbf12664446dd71d0a1e06918be83d45cb1..ea7a238551b914d85a33742c4ff76e77c271132b 100644 (file)
@@ -1,5 +1,5 @@
 USING: io.encodings.utf8 tools.test sbufs kernel io
-sequences strings arrays unicode.syntax ;
+sequences strings arrays unicode ;
 
 : decode-utf8-w/stream ( array -- newarray )
     >sbuf dup reverse-here <utf8> contents >array ;
@@ -7,7 +7,7 @@ sequences strings arrays unicode.syntax ;
 : encode-utf8-w/stream ( array -- newarray )
     SBUF" " clone tuck <utf8> write >array ;
 
-[ { UNICHAR: replacement-character } ] [ { BIN: 11110101 BIN: 10111111 BIN: 10000000 BIN: 11111111 } decode-utf8-w/stream >array ] unit-test
+[ { CHAR: replacement-character } ] [ { BIN: 11110101 BIN: 10111111 BIN: 10000000 BIN: 11111111 } decode-utf8-w/stream >array ] unit-test
 
 [ { BIN: 101111111000000111111 } ] [ { BIN: 11110101 BIN: 10111111 BIN: 10000000 BIN: 10111111 } decode-utf8-w/stream >array ] unit-test
 
@@ -15,7 +15,7 @@ sequences strings arrays unicode.syntax ;
 
 [ { BIN: 11111000000 } ] [ { BIN: 11011111 BIN: 10000000 } decode-utf8-w/stream >array ] unit-test
 
-[ { UNICHAR: replacement-character } ] [ { BIN: 10000000 } decode-utf8-w/stream >array ] unit-test
+[ { CHAR: replacement-character } ] [ { BIN: 10000000 } decode-utf8-w/stream >array ] unit-test
 
 [ { BIN: 1111000000111111 } ] [ { BIN: 11101111 BIN: 10000000 BIN: 10111111 } decode-utf8-w/stream >array ] unit-test