Revert Windows console encoding since the DOS prompt is not really cp1252
parent
730246c5e9
commit
ad7b4cec01
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2004, 2008 Mackenzie Straight, Doug Coleman.
|
! Copyright (C) 2004, 2008 Mackenzie Straight, Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: alien alien.c-types arrays destructors io io.backend io.buffers
|
USING: alien alien.c-types arrays destructors io io.backend
|
||||||
io.files io.ports io.binary io.timeouts io.encodings.8-bit
|
io.buffers io.files io.ports io.binary io.timeouts
|
||||||
windows.errors strings kernel math namespaces sequences windows
|
windows.errors strings kernel math namespaces sequences windows
|
||||||
windows.kernel32 windows.shell32 windows.types windows.winsock
|
windows.kernel32 windows.shell32 windows.types windows.winsock
|
||||||
splitting continuations math.bitwise system accessors ;
|
splitting continuations math.bitwise system accessors ;
|
||||||
|
@ -51,6 +51,4 @@ HOOK: add-completion io-backend ( port -- )
|
||||||
: default-security-attributes ( -- obj )
|
: default-security-attributes ( -- obj )
|
||||||
"SECURITY_ATTRIBUTES" <c-object>
|
"SECURITY_ATTRIBUTES" <c-object>
|
||||||
"SECURITY_ATTRIBUTES" heap-size
|
"SECURITY_ATTRIBUTES" heap-size
|
||||||
over set-SECURITY_ATTRIBUTES-nLength ;
|
over set-SECURITY_ATTRIBUTES-nLength ;
|
||||||
|
|
||||||
M: windows console-encoding windows-1252 ;
|
|
|
@ -14,15 +14,11 @@ HOOK: init-io io-backend ( -- )
|
||||||
|
|
||||||
HOOK: (init-stdio) io-backend ( -- stdin stdout stderr )
|
HOOK: (init-stdio) io-backend ( -- stdin stdout stderr )
|
||||||
|
|
||||||
HOOK: console-encoding os ( -- encoding )
|
|
||||||
|
|
||||||
M: object console-encoding utf8 ;
|
|
||||||
|
|
||||||
: init-stdio ( -- )
|
: init-stdio ( -- )
|
||||||
(init-stdio)
|
(init-stdio)
|
||||||
[ console-encoding <decoder> input-stream set-global ]
|
[ utf8 <decoder> input-stream set-global ]
|
||||||
[ console-encoding <encoder> output-stream set-global ]
|
[ utf8 <encoder> output-stream set-global ]
|
||||||
[ console-encoding <encoder> error-stream set-global ] tri* ;
|
[ utf8 <encoder> error-stream set-global ] tri* ;
|
||||||
|
|
||||||
HOOK: io-multiplex io-backend ( us -- )
|
HOOK: io-multiplex io-backend ( us -- )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue