[Haskell-beginners] Simple UTF-8 output

Christopher Howard christopher.howard at frigidcode.com
Fri May 27 06:54:24 CEST 2011


Hi. I'm trying to print out UTF-8 strings (pulled from a MySQL database
through HDBC.ODBC). If I just print them out, the extended characters
are printed out as question marks. If I use show on them (which is what
I want to do in this case) they are printed as \NNNNN... (presumably the
Unicode number).

Google brought up hundreds of topics for "Haskell utf-8" but its like
looking for a single tree in a forest.

I took great care to ensure my Gentoo Linux system is UTF-8 ready, and I
can type or echo utf-8 characters on the command line just fine.

# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

-- 
frigidcode.com
theologia.indicium.us



More information about the Beginners mailing list