[Haskell-cafe] GHC rendering of non-ASCII characters configurable?
cobbe at ccs.neu.edu
Wed Aug 1 02:35:04 CEST 2012
On Tue, Jul 31, 2012 at 09:17:34PM +1000, Ivan Lazar Miljenovic wrote:
> On 31 July 2012 21:01, Richard Cobbe <cobbe at ccs.neu.edu> wrote:
> > On Mon, Jul 30, 2012 at 11:45:38PM +1000, Ivan Lazar Miljenovic wrote:
> >> Can I ask what you're doing here? Are you printing individual
> >> characters or entire chunks of text?
> > Mostly, I'm working with expressions of type String, rather than Text;
> Any particular reason why? Using Text will probably solve your
> problem and give you a performance improvement at the same time.
Well, I initially went with String because I didn't want to clutter up my
code with all of the calls to 'pack', especially around string literals.
I'm open to being convinced that it's worth it to switch, though.
In any case, while Text is undoubtedly faster than String, it unfortunately
doesn't solve my problem with output rendering:
GHCi, version 7.4.1: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> :m +Data.Text
Prelude Data.Text> pack "\x1f00"
Loading package array-0.4.0.0 ... linking ... done.
Loading package bytestring-0.9.2.1 ... linking ... done.
Loading package deepseq-18.104.22.168 ... linking ... done.
Loading package text-0.11.2.0 ... linking ... done.
Prelude Data.Text> pack "\x1f01"
More information about the Haskell-Cafe