Johannes Waldmann | 23 Oct 16:21 2012
Picon

hsql-mysql encoding issues

Hi. 

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.
(Continue reading)

Daniel van den Eijkel | 23 Oct 19:04 2012
Picon
Picon

Re: hsql-mysql encoding issues

Hi,

I can't say anything about HSQL, but I use HDBC and I'm happy with it. 
[1] says it's the most popular database for Haskell.
Best, Daniel

[1] http://en.wikibooks.org/wiki/Haskell/Database

Am 10/23/12 4:21 PM, schrieb Johannes Waldmann:
> Hi.
>
> 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?
>
(Continue reading)

Johannes Waldmann | 24 Oct 11:10 2012
Picon

Re: hsql-mysql encoding issues

Daniel van den Eijkel <dvde <at> gmx.net> writes:

> ... but I use HDBC and I'm happy with it. 

including its handling of character encodings?

(That is, do you have, e.g., texts with umlauts in your data?)
Daniel van den Eijkel | 24 Oct 14:17 2012
Picon
Picon

Re: hsql-mysql encoding issues

So far I used HDBC with mysql and sqlite3, in both cases with UTF8 
encoded data (filenames including chinese characters, umlauts etc, 
e.g.). (After connecting to mysql, I use the statement "set names utf8"; 
sqlite does not need this)

Am 10/24/12 11:10 AM, schrieb Johannes Waldmann:
> Daniel van den Eijkel <dvde <at> gmx.net> writes:
>
>> ... but I use HDBC and I'm happy with it.
> including its handling of character encodings?
>
> (That is, do you have, e.g., texts with umlauts in your data?)
>
>
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe <at> haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
Alexander Bau | 29 Oct 22:06 2012
Picon

Re: hsql-mysql encoding issues

Hi,

> what DB binding should I rather be using?

mongoDB [1] works well (also for data with umlauts) for my feed
aggregator [2].

Best regards,

Alex

[1] http://hackage.haskell.org/package/mongoDB
[2] http://hackage.haskell.org/package/lucienne

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Gmane