How to display Russian characters in haskell?

There is a sequence of commands.
But the characters are displayed in ascii how to recode to utf-8 so Russian characters are displayed?

let nouns = ["hobo", "frog", "pop"]

let adjs = ["lazy", "grouchy", "sly"]

[adj ++ "" ++ noun | adj <- adjs, noun <- nouns]
June 14th 19 at 20:16
1 answer
June 14th 19 at 20:18
Solution
As it should be. Is unicode print/show him screens. You need Unicode to display correctly using putStrLn.
Try:
sequence_ $ map putStrLn [adj ++ "" ++ noun | adj <- adjs, noun <- nouns]


If you want to output unescaped Unicode via print/show, then please note on this package https://hackage.haskell.org/package/unicode-show
and you lists of nouns and adjs announced? - sister58 commented on June 14th 19 at 20:21
in General, for learning suggest to abandon Unicode. Use strings in English. The result will look much nicer. - sister58 commented on June 14th 19 at 20:24
, It worked, thank you. repl for some reason the first time didn't display the result - Jace43 commented on June 14th 19 at 20:27

Find more questions by tags Haskell