Skip to content

A Haskell Package for unescaping unicode characters in print and show.

License

Notifications You must be signed in to change notification settings

nushio3/unicode-show

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unicode-show : readable unicode characters in print and show. Build Status

Provides a interactive printer for printing Unicode characters in ghci REPL. Our design goal is that uprint produces String representations that are valid Haskell String literals, and uses as many Unicode printable characters as possible. Hence read . ushow == id

See the tests of this package for detailed specifications.

Example

With print :

$ ghci
...
> ["哈斯克尔7.6.1"]
["\21704\26031\20811\23572\&7.6.1"]
>

With uprint :

$ ghci -interactive-print=Text.Show.Unicode.uprint Text.Show.Unicode
...
Ok, modules loaded: Text.Show.Unicode.
> ("Хорошо!",["哈斯克尔7.6.1的力量","感じる"])
("Хорошо!",["哈斯克尔7.6.1的力量","感じる"])
> "改\n行"
"改\n行"

You can make uprint the default interactive printer in several ways. One is to cabal install unicode-show, and add the following lines to your ~/.ghci config file.

import qualified Text.Show.Unicode
:set -interactive-print=Text.Show.Unicode.uprint

References

About

A Haskell Package for unescaping unicode characters in print and show.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published