]> gitweb.factorcode.org Git - factor.git/commitdiff
libc.windows: We have to use utf8 since this is a libc call and the native
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 7 Jul 2014 05:50:01 +0000 (00:50 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 7 Jul 2014 05:50:47 +0000 (00:50 -0500)
encoding on windows is utf16n.

basis/libc/windows/windows.factor

index 541cd7b84aecddb73a990c01e7b54c649de6a5b3..85d25cadd8b8d8c7cb0855452830315cf011ac0c 100644 (file)
@@ -1,5 +1,5 @@
 USING: alien.c-types alien.strings alien.syntax destructors
-kernel libc system ;
+io.encodings.utf8 kernel libc system ;
 IN: libc
 
 LIBRARY: libc
@@ -112,5 +112,5 @@ M: windows strerror ( errno -- str )
     [
         [ 1024 [ malloc &free ] keep ] dip
         [ strerror_s drop ] 3keep 2drop
-        alien>native-string
+        utf8 alien>string
     ] with-destructors ;