Use utf8 instead of ascii encoding in a couple of places to avoid pulling in ascii into deployed apps

db4
Slava Pestov 2009-08-23 19:07:21 -05:00
parent 387007abfe
commit 449be040f8
4 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
! Copyright (C) 2006, 2009 Slava Pestov ! Copyright (C) 2006, 2009 Slava Pestov
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: specialized-arrays.int arrays kernel math namespaces make USING: arrays kernel math namespaces make
cocoa cocoa.messages cocoa.classes core-graphics cocoa cocoa.messages cocoa.classes core-graphics
core-graphics.types sequences continuations accessors ; core-graphics.types sequences continuations accessors ;
IN: cocoa.views IN: cocoa.views

View File

@ -1,8 +1,8 @@
! Copyright (C) 2009 Slava Pestov. ! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: kernel assocs math math.parser memoize USING: kernel assocs math math.parser memoize io.encodings.utf8
io.encodings.ascii io.files lexer parser io.files lexer parser colors sequences splitting
colors sequences splitting combinators.smart ascii ; combinators.smart ascii ;
IN: colors.constants IN: colors.constants
<PRIVATE <PRIVATE
@ -19,7 +19,7 @@ IN: colors.constants
[ parse-color ] H{ } map>assoc ; [ parse-color ] H{ } map>assoc ;
MEMO: rgb.txt ( -- assoc ) MEMO: rgb.txt ( -- assoc )
"resource:basis/colors/constants/rgb.txt" ascii file-lines parse-rgb.txt ; "resource:basis/colors/constants/rgb.txt" utf8 file-lines parse-rgb.txt ;
PRIVATE> PRIVATE>

View File

@ -7,7 +7,7 @@ cocoa.views cocoa.windows combinators command-line
core-foundation core-foundation.run-loop core-graphics core-foundation core-foundation.run-loop core-graphics
core-graphics.types destructors fry generalizations io.thread core-graphics.types destructors fry generalizations io.thread
kernel libc literals locals math math.bitwise math.rectangles memory kernel libc literals locals math math.bitwise math.rectangles memory
namespaces sequences specialized-arrays.int threads ui namespaces sequences threads ui
ui.backend ui.backend.cocoa.views ui.clipboards ui.gadgets ui.backend ui.backend.cocoa.views ui.clipboards ui.gadgets
ui.gadgets.worlds ui.pixel-formats ui.pixel-formats.private ui.gadgets.worlds ui.pixel-formats ui.pixel-formats.private
ui.private words.symbol ; ui.private words.symbol ;

View File

@ -3,7 +3,7 @@
USING: accessors alien alien.c-types alien.strings arrays assocs USING: accessors alien alien.c-types alien.strings arrays assocs
cocoa kernel math cocoa.messages cocoa.subclassing cocoa.classes cocoa kernel math cocoa.messages cocoa.subclassing cocoa.classes
cocoa.views cocoa.application cocoa.pasteboard cocoa.types cocoa.views cocoa.application cocoa.pasteboard cocoa.types
cocoa.windows sequences io.encodings.ascii ui ui.private ui.gadgets cocoa.windows sequences io.encodings.utf8 ui ui.private ui.gadgets
ui.gadgets.private ui.gadgets.worlds ui.gestures ui.gadgets.private ui.gadgets.worlds ui.gestures
core-foundation.strings core-graphics core-graphics.types threads core-foundation.strings core-graphics core-graphics.types threads
combinators math.rectangles ; combinators math.rectangles ;
@ -220,7 +220,7 @@ CLASS: {
{ "validateUserInterfaceItem:" "char" { "id" "SEL" "id" } { "validateUserInterfaceItem:" "char" { "id" "SEL" "id" }
[ [
nip -> action nip -> action
2dup [ window ] [ ascii alien>string ] bi* validate-action 2dup [ window ] [ utf8 alien>string ] bi* validate-action
[ [ 2drop ] dip >c-bool ] [ SUPER-> validateUserInterfaceItem: ] if [ [ 2drop ] dip >c-bool ] [ SUPER-> validateUserInterfaceItem: ] if
] ]
} }