[Haskell-cafe] hsql-mysql encoding issues

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Tue Oct 23 16:21:47 CEST 2012


I am using hsql-(mysql-)1.8.2
When compiled with ghc-7.6, the resulting executable
does not seem to be able to read strings from the DB correctly
(umlauts do "vanish")
while it  worked with hsql-(mysql-)1.8.1 and ghc-7.4.

the mysql server says (show variables)

| character_set_client            | latin1                      | 
| character_set_connection        | latin1                      | 
| character_set_database          | latin1                      | 
| character_set_filesystem        | binary                      | 
| character_set_results           | latin1                      | 
| character_set_server            | latin1                      | 
| character_set_system            | utf8                        | 

hsql is using type String all over the place,
while it should be ByteString?

Internally, Database.HSQL.Types.SqlBind 
uses Foreign.C.String.peekCStringLen .
Did the behaviour of this function change?

hsql is quite old, but so is my application.
Assuming I find the time to rewrite my code (not likely) -
what DB binding should I rather be using? 

Thanks - J.W.

More information about the Haskell-Cafe mailing list