on master help sign in
References to ISO-10464 (testing of gas cylinders) should actually be ISO-10646. (John Pybus)

Ignore-this: e1f8669ebe9101e7c1897713e4a03e05 darcs-hash:20090906023356-f0a0d-bc7e20472f9fd9a0a227f71d84ddf93b063a118b.gz

commitdcc295163ec1a615f73f6c41527e13b10bb9dec6 authorcoreyoconnor <coreyoconnor@gmail.com> dateSat 5 Sep 2009, 19:33 (17 years ago) parent7b38759
8 files changed+166−119
src/Codec/Binary/UTF8/Debug.hs+1−1 src/Graphics/Vty.hs+4−2 src/Graphics/Vty/Attributes.hs+56−42 src/Graphics/Vty/Image.hs+50−39 src/Graphics/Vty/Picture.hs+13−13 src/Graphics/Vty/Terminal.hs+35−15 test/Test.hs+1−1 test/interactive_terminal_test.hs+6−6
src/Codec/Binary/UTF8/Debug.hs+1−1
@@ -8,7 +8,7 @@ import Data.Word
88
99import Numeric
1010
11−-- Converts an array of ISO-10464 characters (Char type) to an array of Word8 bytes that is the
11+-- Converts an array of ISO-10646 characters (Char type) to an array of Word8 bytes that is the
1212-- corresponding UTF8 byte sequence
1313utf8_from_iso :: Integral i => [i] -> [Word8]
1414utf8_from_iso = encode . map toEnum
src/Graphics/Vty.hs+4−2
@@ -37,12 +37,14 @@ import System.IO
3737-- An alternative is to use unsafePerformIO to automatically create a singleton Vty instance when
3838-- required.
3939--
40−-- This has the same thread safety as `output_picture`.
40+-- This does not assure any thread safety. In theory, as long as an update action is not executed
41+-- when another update action is already then it's safe to call this on multiple threads.
4142--
4243-- todo: Once the Terminal interface encompasses input this interface will be deprecated.
4344-- Currently, just using the Terminal interface there is no support for input events.
4445data Vty = Vty
45− { -- | Outputs the given Picture. Equivalent to output_picture.
46+ { -- | Outputs the given Picture. Equivalent to output_picture applied to a display context
47+ -- implicitly managed by Vty.
4648 update :: Picture -> IO ()
4749 -- | Get one Event object, blocking if necessary.
4850 , next_event :: IO Event
src/Graphics/Vty/Attributes.hs+56−42
@@ -1,27 +1,5 @@
11-- Copyright 2009 Corey O'Connor
22-- Display attributes
3−{-# LANGUAGE MagicHash #-}
4−module Graphics.Vty.Attributes
5− where
6−
7−import Data.Bits
8−
9−import Data.Word
10−
11−import Numeric
12−
13−-- | A display attribute defines the color and style of all the characters rendered after the
14−-- attribute is applied.
15−-- 6 possible style attributes:
16−-- standout
17−-- underline
18−-- reverse
19−-- blink
20−-- dim
21−-- bold/bright
22−-- ( invisible, protect, and altcharset are not supported)
23−-- At most 240 + 16 colors for the background and foreground. The 240 colors and 16 colors are
24−-- points in different palettes. Which is why it's not simply "at most 256 colors"
253--
264-- For efficiency this can be, in the future, encoded into a single 32 bit word. The 32 bit word is
275-- first divided into 4 groups of 8 bits where:
@@ -54,6 +32,19 @@ import Numeric
5432-- Then the foreground color encoded into 8 bits.
5533-- Then the background color encoded into 8 bits.
5634--
35+module Graphics.Vty.Attributes
36+ where
37+
38+import Data.Bits
39+
40+import Data.Word
41+
42+-- | A display attribute defines the Color and Style of all the characters rendered after the
43+-- attribute is applied.
44+--
45+-- At most 256 colors, picked from a 240 and 16 color palette, are possible for the background and
46+-- foreground. The 240 colors and 16 colors are points in different palettes. See Color for more
47+-- information.
5748data Attr = Attr
5849 { style :: !(MaybeDefault Style)
5950 , fore_color :: !(MaybeDefault Color)
@@ -62,32 +53,44 @@ data Attr = Attr
6253
6354-- | Specifies the display attributes such that the final style and color values do not depend on
6455-- the previously applied display attribute. The display attributes can still depend on the
65−-- terminal's default attributes unfortunately.
56+-- terminal's default colors (unfortunately).
6657data FixedAttr = FixedAttr
6758 { fixed_style :: !Style
6859 , fixed_fore_color :: !(Maybe Color)
6960 , fixed_back_color :: !(Maybe Color)
7061 } deriving ( Eq, Show )
7162
63+-- | The style and color attributes can either be the terminal defaults. Or be equivalent to the
64+-- previously applied style. Or be a specific value.
7265data Eq v => MaybeDefault v = Default | KeepCurrent | SetTo !v
7366 deriving ( Eq, Show )
7467
7568-- | Abstract data type representing a color.
7669--
7770-- Currently the foreground and background color are specified as points in either a:
71+--
7872-- * 16 color palette. Where the first 8 colors are equal to the 8 colors of the ISO 6429 (ANSI) 8
7973-- color palette and the second 8 colors are bright/vivid versions of the first 8 colors.
74+--
8075-- * 240 color palette. This palette is a regular sampling of the full RGB colorspace.
8176--
8277-- The 8 ISO 6429 (ANSI) colors are as follows:
83−-- 0. black
84−-- 1. red
85−-- 2. green
86−-- 3. yellow
87−-- 4. blue
88−-- 5. magenta
89−-- 6. cyan
90−-- 7. white
78+--
79+-- 0. black
80+--
81+-- 1. red
82+--
83+-- 2. green
84+--
85+-- 3. yellow
86+--
87+-- 4. blue
88+--
89+-- 5. magenta
90+--
91+-- 6. cyan
92+--
93+-- 7. white
9194--
9295-- The mapping from points in the 240 color palette to colors actually displayable by the terminal
9396-- depends on the number of colors the terminal claims to support. Which is usually determined by
@@ -122,8 +125,6 @@ white = ISOColor 7
122125
123126-- | Bright/Vivid variants of the standard 8-color ANSI
124127bright_black, bright_red, bright_green, bright_yellow :: Color
125−
126−-- | Bright/Vivid variants of the standard 8-color ANSI
127128bright_blue, bright_magenta, bright_cyan, bright_white :: Color
128129bright_black = ISOColor 8
129130bright_red = ISOColor 9
@@ -134,16 +135,26 @@ bright_magenta= ISOColor 13
134135bright_cyan = ISOColor 14
135136bright_white = ISOColor 15
136137
138+-- | Styles are represented as an 8 bit word. Each bit in the word is 1 if the style attribute
139+-- assigned to that bit should be applied and 0 if the style attribute should not be applied.
137140type Style = Word8
138141
139−-- | 6 possible style attributes:
140−-- standout
141−-- underline
142−-- reverse_video
143−-- blink
144−-- dim
145−-- bold/bright
146−-- ( invisible, protect, and altcharset are not supported)
142+-- | The 6 possible style attributes:
143+--
144+-- * standout
145+--
146+-- * underline
147+--
148+-- * reverse_video
149+--
150+-- * blink
151+--
152+-- * dim
153+--
154+-- * bold/bright
155+--
156+-- ( The invisible, protect, and altcharset display attributes some terminals support are not
157+-- supported via VTY.)
147158standout, underline, reverse_video, blink, dim, bold :: Style
148159standout = 0x01
149160underline = 0x02
@@ -162,8 +173,9 @@ style_mask attr
162173 KeepCurrent -> 0
163174 SetTo v -> v
164175
176+-- | true if the given Style value has the specified Style set.
165177has_style :: Style -> Style -> Bool
166−has_style style bit_mask = ( style .&. bit_mask ) /= 0
178+has_style s bit_mask = ( s .&. bit_mask ) /= 0
167179
168180-- | Set the foreground color of an `Attr'.
169181with_fore_color :: Attr -> Color -> Attr
@@ -184,7 +196,9 @@ def_attr = Attr Default Default Default
184196
185197-- | Keeps the style, background color and foreground color that was previously set. Used to
186198-- override some part of the previous style.
199+--
187200-- EG: current_style `with_fore_color` bright_magenta
201+--
188202-- Would be the currently applied style (be it underline, bold, etc) but with the foreground color
189203-- set to bright_magenta.
190204current_attr :: Attr
src/Graphics/Vty/Image.hs+50−39
@@ -2,23 +2,7 @@
22{-# LANGUAGE BangPatterns #-}
33{-# LANGUAGE NamedFieldPuns #-}
44{-# LANGUAGE DisambiguateRecordFields #-}
5−{-# LANGUAGE MagicHash, UnboxedTuples #-}
65{-# OPTIONS_GHC -funbox-strict-fields #-}
7−{- A picutre in VTY defines
8− - * properties required to display the image. These are properties that effect the output image
9− - but are independent of position
10− - * A set of position-dependent text and attribute regions. The possible regions are
11− - * a point
12− - * a horizontal line of characters with a single attribute
13− - * a vertical line of a single character
14− - * a horizontal line of a single character.
15− - * a rectangle of a single character
16− -
17− -
18− -
19− - todo: Move to UTF-8 encoded bytestring streams?
20− -}
21−
226module Graphics.Vty.Image ( Image(..)
237 , image_width
248 , image_height
@@ -31,7 +15,7 @@ module Graphics.Vty.Image ( Image(..)
3115 , background_fill
3216 , char
3317 , string
34− , iso_10464_string
18+ , iso_10646_string
3519 , utf8_string
3620 , utf8_bytestring
3721 , char_fill
@@ -56,17 +40,34 @@ infixr 4 <->
5640
5741type StringSeq = Seq.Seq Char
5842
43+-- | An image in VTY defines:
44+--
45+-- * properties required to display the image. These are properties that effect the output image
46+-- but are independent of position
47+--
48+-- * A set of position-dependent text and attribute regions. The possible regions are:
49+--
50+-- * a point. ( char )
51+--
52+-- * a horizontal line of characters with a single attribute. (string, utf8_string,
53+-- utf8_bytestring )
54+--
55+-- * a fill of a single character. (char_fill)
56+--
57+-- * a fill of the picture's background. (background_fill)
58+--
59+-- todo: increase the number of encoded bytestring formats supported.
5960data Image =
60− -- | A horizontal text span is always >= 1 column and has a row height of 1.
61+ -- A horizontal text span is always >= 1 column and has a row height of 1.
6162 HorizText
6263 { attr :: !Attr
63− -- | All character data is stored as Char sequences with the ISO-10646 encoding.
64+ -- All character data is stored as Char sequences with the ISO-10646 encoding.
6465 , text :: StringSeq
65− -- | in columns
66+ -- in columns
6667 , output_width :: !Word -- >= 0
6768 , char_width :: !Word -- >= 1
6869 }
69− -- | A horizontal join can be constructed between any two images. However a HorizJoin instance is
70+ -- A horizontal join can be constructed between any two images. However a HorizJoin instance is
7071 -- required to be between two images of equal height. The horiz_join constructor adds blanks to
7172 -- the provided images that assure this is true for the HorizJoin value produced.
7273 | HorizJoin
@@ -75,7 +76,7 @@ data Image =
7576 , output_width :: !Word -- >= 1
7677 , output_height :: !Word -- >= 1
7778 }
78− -- | A veritical join can be constructed between any two images. However a VertJoin instance is
79+ -- A veritical join can be constructed between any two images. However a VertJoin instance is
7980 -- required to be between two images of equal width. The horiz_join constructor adds blanks to
8081 -- the provides images that assure this is true for the HorizJoin value produced.
8182 | VertJoin
@@ -84,7 +85,7 @@ data Image =
8485 , output_width :: !Word -- >= 1
8586 , output_height :: !Word -- >= 1
8687 }
87− -- | A background fill will be filled with the background pattern. The background pattern is
88+ -- A background fill will be filled with the background pattern. The background pattern is
8889 -- defined as a property of the Picture this Image is used to form.
8990 | BGFill
9091 { output_width :: !Word -- >= 1
@@ -173,14 +174,14 @@ vert_join i_0 i_1 w h
173174 w h
174175vert_join _ _ _ _ = error "vert_join applied to undefined values."
175176
176−-- | An area of the picture's bacground (See `Background`) of w columns and h rows.
177+-- | An area of the picture's bacground (See Background) of w columns and h rows.
177178background_fill :: Word -> Word -> Image
178179background_fill w h
179180 | w == 0 = IdImage
180181 | h == 0 = IdImage
181182 | otherwise = BGFill w h
182183
183−-- | Access the width of an Image.
184+-- | The width of an Image. This is the number display columns the image will occupy.
184185image_width :: Image -> Word
185186image_width HorizText { output_width = w } = w
186187image_width HorizJoin { output_width = w } = w
@@ -188,7 +189,7 @@ image_width VertJoin { output_width = w } = w
188189image_width BGFill { output_width = w } = w
189190image_width IdImage = 0
190191
191−-- | Access the height of an Image.
192+-- | The height of an Image. This is the number of display rows the image will occupy.
192193image_height :: Image -> Word
193194image_height HorizText {} = 1
194195image_height HorizJoin { output_height = r } = r
@@ -197,10 +198,10 @@ image_height BGFill { output_height = r } = r
197198image_height IdImage = 0
198199
199200-- | Combines two images side by side.
200−-- The result image will have a width equal to the sum of the two images width.
201−-- The height will equal the largest height of the two images
202−-- The area not defined in one image due to a height missmatch will be filled with the background
203−-- pattern.
201+--
202+-- The result image will have a width equal to the sum of the two images width. And the height will
203+-- equal the largest height of the two images. The area not defined in one image due to a height
204+-- missmatch will be filled with the background pattern.
204205(<|>) :: Image -> Image -> Image
205206
206207-- Two horizontal text spans with the same attributes can be merged.
@@ -257,24 +258,30 @@ vertcat :: [Image] -> Image
257258vertcat = vert_cat
258259
259260-- | an image of a single character. This is a standard Haskell 31-bit character assumed to be in
260−-- the ISO-10464 encoding.
261+-- the ISO-10646 encoding.
261262char :: Attr -> Char -> Image
262263char !a !c = HorizText a (Seq.singleton c) (safe_wcwidth c) 1
263264
264−-- | A string of characters layed out on a single row. The string is assumed to be a sequence of
265−-- ISO-10464 characters. Note: depending on how the Haskell compiler represents string literals a
266−-- string literal in a UTF-8 encoded source file, for example, may be represented as a ISO-10464
267−-- string. That is, I think, the case with GHC 6.10.
268−iso_10464_string :: Attr -> String -> Image
269−iso_10464_string !a !str = horiz_text a (Seq.fromList str) (safe_wcswidth str)
265+-- | A string of characters layed out on a single row with the same display attribute. The string is
266+-- assumed to be a sequence of ISO-10646 characters.
267+--
268+-- Note: depending on how the Haskell compiler represents string literals a string literal in a
269+-- UTF-8 encoded source file, for example, may be represented as a ISO-10646 string.
270+-- That is, I think, the case with GHC 6.10. This means, for the most part, you don't need to worry
271+-- about the encoding format when outputting string literals. Just provide the string literal
272+-- directly to iso_10646_string or string.
273+--
274+iso_10646_string :: Attr -> String -> Image
275+iso_10646_string !a !str = horiz_text a (Seq.fromList str) (safe_wcswidth str)
270276
271277-- | Alias for iso_10646_string. Since the usual case is that a literal string like "foo" is
272−-- represented internally as a list of ISO 10646 31 bit characters.
278+-- represented internally as a list of ISO 10646 31 bit characters.
279+--
273280-- Note: Keep in mind that GHC will compile source encoded as UTF-8 but the literal strings, while
274281-- UTF-8 encoded in the source, will be transcoded to a ISO 10646 31 bit characters runtime
275282-- representation.
276283string :: Attr -> String -> Image
277−string = iso_10464_string
284+string = iso_10646_string
278285
279286-- | A string of characters layed out on a single row. The string is assumed to be a sequence of
280287-- UTF-8 characters.
@@ -295,6 +302,10 @@ safe_wcswidth str = case wcswidth str of
295302utf8_bytestring :: Attr -> BS.ByteString -> Image
296303utf8_bytestring !a !bs = string a (UTF8.toString $ UTF8.fromRep bs)
297304
305+-- | creates a fill of the specified character. The dimensions are in number of characters wide and
306+-- number of rows high.
307+--
308+-- Unlike the Background fill character this character can have double column display width.
298309char_fill :: Enum d => Attr -> Char -> d -> d -> Image
299310char_fill !a !c w h =
300311 vert_cat $ replicate (fromEnum h) $ horiz_cat $ replicate (fromEnum w) $ char a c
src/Graphics/Vty/Picture.hs+13−13
@@ -12,7 +12,7 @@ module Graphics.Vty.Picture ( module Graphics.Vty.Picture
1212 , background_fill
1313 , char
1414 , string
15− , iso_10464_string
15+ , iso_10646_string
1616 , utf8_string
1717 , utf8_bytestring
1818 , char_fill
@@ -35,7 +35,7 @@ data Picture = Picture
3535 , pic_background :: Background
3636 }
3737
38−-- | Create a picture instance from the given image. The picture will not have a displayed cursor
38+-- | Create a picture for display for the given image. The picture will not have a displayed cursor
3939-- and the background display attribute will be `current_attr`.
4040pic_for_image :: Image -> Picture
4141pic_for_image i = Picture
@@ -46,25 +46,25 @@ pic_for_image i = Picture
4646
4747-- | A picture can be configured either to not show the cursor or show the cursor at the specified
4848-- character position.
49+--
4950-- There is not a 1 to 1 map from character positions to a row and column on the screen due to
5051-- characters that take more than 1 column.
51−-- todo?: The Cursor can be given a (character,row) offset outside of the visible bounds of the output
52−-- region. In this case the cursor will not be shown.
52+--
53+-- todo: The Cursor can be given a (character,row) offset outside of the visible bounds of the
54+-- output region. In this case the cursor will not be shown.
5355data Cursor =
5456 NoCursor
5557 | Cursor Word Word
5658
57−-- | Unspecified regions are filled with the picture's background pattern.
58−-- The background pattern can specify a character and a display attribute. If the display attribute
59−-- used previously should be used for a background fill then use `current_attr` for the background
60−-- attribute. This is the default background display attribute.
59+-- | Unspecified regions are filled with the picture's background pattern. The background pattern
60+-- can specify a character and a display attribute. If the display attribute used previously should
61+-- be used for a background fill then use `current_attr` for the background attribute. This is the
62+-- default background display attribute.
6163--
62−-- The current attribute is always set to the default attributes on the start of updating the screen
63−-- to a picture.
64+-- (tofix) The current attribute is always set to the default attributes at the start of updating the
65+-- screen to a picture.
6466--
65−-- todo: The background character *must* occupy a single column and no more.
66−-- The spans for a picture do not specify character data beyond the bounds of the region provided.
67−-- A text run may be cropped or padded to fit within the region.
67+-- (tofix) The background character *must* occupy a single column and no more.
6868data Background = Background
6969 { background_char :: Char
7070 , background_attr :: Attr
src/Graphics/Vty/Terminal.hs+35−15
@@ -11,15 +11,6 @@
1111-- for as many control codes as possible. H: This should derive functionality from the
1212-- TerminfoBased terminal.
1313--
14−-- Selection of a terminal is done as follows:
15−-- If TERM == xterm
16−--
17−-- todo: Use XTermColor with the variant parameter
18−-- StandardXTerm if COLORTERM is not set
19−-- GnomeTerminal if COLORTERM is gnome-terminal
20−-- - Default attribute is different ?How?
21−-- - No blink support
22−-- otherwise TerminfoBased is used.
2314--
2415{-# LANGUAGE ScopedTypeVariables #-}
2516{-# LANGUAGE GADTs #-}
@@ -45,20 +36,47 @@ import Data.Word
4536
4637import System.Environment
4738
48−-- | The terminal has to be determined dynamically at runtime. To satisfy this requirement all
39+-- | Returns a TerminalHandle (an abstract Terminal instance) for the current terminal.
40+--
41+-- The specific Terminal implementation used is hidden from the API user. All terminal
42+-- implementations are assumed to perform more, or less, the same. Currently all implementations use
43+-- terminfo for at least some terminal specific information. This is why platforms without terminfo
44+-- are not supported. However, as mentioned before, any specifics about it being based on terminfo
45+-- are hidden from the API user. If a terminal implementation is developed for a terminal for a
46+-- platform without terminfo support then Vty should work as expected on that terminal.
47+--
48+-- Selection of a terminal is done as follows:
49+--
50+-- * If TERM == xterm
51+-- then the terminal might be one of the Mac OS X .app terminals. Check if that might be
52+-- the case and use MacOSX if so.
53+-- otherwise use XTermColor.
54+--
55+-- * for any other TERM value TerminfoBased is used.
56+--
57+--
58+-- The terminal has to be determined dynamically at runtime. To satisfy this requirement all
4959-- terminals instances are lifted into an abstract terminal handle via existential qualification.
5060-- This implies that the only equations that can used are those in the terminal class.
61+--
62+-- To differentiate between Mac OS X terminals this uses the TERM_PROGRAM environment variable.
63+-- However, an xterm started by Terminal or iTerm *also* has TERM_PROGRAM defined since the
64+-- environment variable is not reset/cleared by xterm. However a Terminal.app or iTerm.app started
65+-- from an xterm under X11 on mac os x will likely be done via open. Since this does not propogate
66+-- environment variables (I think?) this assumes that XTERM_VERSION will never be set for a true
67+-- Terminal.app or iTerm.app session.
68+--
69+-- todo: add an implementation for windows that does not depend on terminfo. Should be installable
70+-- with only what is provided in the haskell platform.
71+--
72+-- todo: The Terminal interface does not provide any input support.
5173terminal_handle :: IO TerminalHandle
5274terminal_handle = do
5375 term_type <- getEnv "TERM"
5476 t <- if "xterm" `isPrefixOf` term_type
5577 then do
56− -- Mac OS X terminals define TERM_PROGRAM. Course, an xterm started by Terminal or iTerm
57− -- *also* has TERM_PROGRAM defined. However Terminal or iTerm will never have
58− -- XTERM_VERSION defined. whew
5978 maybe_terminal_app <- get_env "TERM_PROGRAM"
6079 case maybe_terminal_app of
61− -- No TERM_PROGRAM then assume actual xterm
6280 Nothing
6381 -> XTermColor.terminal_instance term_type >>= new_terminal_handle
6482 Just v | v == "Apple_Terminal" || v == "iTerm.app"
@@ -86,19 +104,21 @@ terminal_handle = do
86104-- Characters can be a variable number of columns in width.
87105--
88106-- Currently, the only way to set the cursor position to a given character coordinate is to specify
89−-- the coordinate in the `Picture` instance provided to `output_picture`.
107+-- the coordinate in the Picture instance provided to output_picture or refresh.
90108set_cursor_pos :: TerminalHandle -> Word -> Word -> IO ()
91109set_cursor_pos t x y = do
92110 bounds <- display_bounds t
93111 d <- display_context t bounds
94112 marshall_to_terminal t (move_cursor_required_bytes d x y) (serialize_move_cursor d x y)
95113
114+-- | Hides the cursor
96115hide_cursor :: TerminalHandle -> IO ()
97116hide_cursor t = do
98117 bounds <- display_bounds t
99118 d <- display_context t bounds
100119 marshall_to_terminal t (hide_cursor_required_bytes d) (serialize_hide_cursor d)
101120
121+-- | Shows the cursor
102122show_cursor :: TerminalHandle -> IO ()
103123show_cursor t = do
104124 bounds <- display_bounds t
test/Test.hs+1−1
@@ -39,4 +39,4 @@ current_pic x y sx sy btl = pic_for_image i
3939 <-> char_fill pieceA ' ' sx (y - 1)
4040 <-> char_fill pieceA ' ' x 1 <|> char pieceA '@' <|> char_fill pieceA ' ' (sx - x - 1) 1
4141 <-> char_fill pieceA ' ' sx (sy - y - 2)
42− <-> iso_10464_string dumpA btl
42+ <-> iso_10646_string dumpA btl
test/interactive_terminal_test.hs+6−6
@@ -354,8 +354,8 @@ utf8_txt_0 = [ [ 0xe2 , 0x86 , 0x91 ]
354354 , [ 0x41 ]
355355 ]
356356
357−iso_10464_txt_0 :: String
358−iso_10464_txt_0 = map toEnum
357+iso_10646_txt_0 :: String
358+iso_10646_txt_0 = map toEnum
359359 [ 8593
360360 , 8593
361361 , 8595
@@ -394,7 +394,7 @@ unicode_single_width_1 = Test
394394 reserve_display t
395395 let pic = pic_for_image image
396396 image = line_0 <-> line_1
397− line_0 = iso_10464_string def_attr iso_10464_txt_0
397+ line_0 = iso_10646_string def_attr iso_10646_txt_0
398398 line_1 = string def_attr "0123456789"
399399 d <- display_bounds t >>= display_context t
400400 output_picture d pic
@@ -446,8 +446,8 @@ utf8_txt_1 = [ [0xe4,0xbd,0xa0]
446446 , [0xe5,0x90,0x97]
447447 ]
448448
449−iso_10464_txt_1 :: String
450−iso_10464_txt_1 = map toEnum [20320,22909,21527]
449+iso_10646_txt_1 :: String
450+iso_10646_txt_1 = map toEnum [20320,22909,21527]
451451
452452unicode_double_width_0 = Test
453453 { test_name = "Verify terminal can display unicode double-width characters. (Direct UTF-8)"
@@ -475,7 +475,7 @@ unicode_double_width_1 = Test
475475 reserve_display t
476476 let pic = pic_for_image image
477477 image = line_0 <-> line_1
478− line_0 = iso_10464_string def_attr iso_10464_txt_1
478+ line_0 = iso_10646_string def_attr iso_10464_txt_1
479479 line_1 = string def_attr "012345"
480480 d <- display_bounds t >>= display_context t
481481 output_picture d pic