Re: Problem with DB and Char size

2005-01-27 Thread Ketil Malde
"Santoemma Enrico" <[EMAIL PROTECTED]> writes: > The problem is: Oracle ODBC driver expects, at least under Windows, > UCS-2 strings. Then, if the DB is set to UTF-8, it converts the string > into UTF-8. I'm using HSQL to access ODBC. Isn't UCS-2 the old 16-bit Unicode representation? So that c

R: Problem with DB and Char size (2)

2005-01-27 Thread Santoemma Enrico
This is exactly what happens: (btw, the same thing happens in Python, so the trouble must be in the Oracle odbc driver. But this is also what happens today to any Haskell business application which connects to Oracle, as - to my knowledge - there is no native Oracle driver for Haskell) ... stmt

Re: Problem with DB and Char size (2)

2005-01-27 Thread Krasimir Angelov
On Thu, 27 Jan 2005 06:34:40 -0800, John Meacham <[EMAIL PROTECTED]> wrote: > On Thu, Jan 27, 2005 at 04:23:52PM +0200, Krasimir Angelov wrote: > > HSQL uses withCString internally. withCString strips the higher order > > bytes from Char. > > You should be able to replace withCString with withUTF8

Re: Problem with DB and Char size (2)

2005-01-27 Thread John Meacham
On Thu, Jan 27, 2005 at 04:23:52PM +0200, Krasimir Angelov wrote: > HSQL uses withCString internally. withCString strips the higher order > bytes from Char. You should be able to replace withCString with withUTF8String from my CWStringBasic module, which you can get from here: http://repetae.net/j

Re: Problem with DB and Char size (2)

2005-01-27 Thread robert dockins
As I haven't found how to force the driver not to strip the byte, and also I don't like to convert data two times, I'd try to send 8 bit strings, but don't know how. Is Word8 a solution? If it is, what is the contstructor?, as w = W8# 1 doesn't compile. I'm weak on low level Haskell. Where do I

Re: Problem with DB and Char size (2)

2005-01-27 Thread Krasimir Angelov
HSQL uses withCString internally. withCString strips the higher order bytes from Char. On Thu, 27 Jan 2005 15:11:38 +0100, Santoemma Enrico <[EMAIL PROTECTED]> wrote: > Oops... I hit the wrong key, sending a partial post. Sorry :) > > Again: > I have a problem with strings and unicode chars, whe

Problem with DB and Char size

2005-01-27 Thread Santoemma Enrico
I have a problem with strings and unicode chars, when writing slq statements on Oracle ODBC driver through HSQL. I'm writing here because I suspect that a fix could come from writing 8 bit strings, if it is possible somehow. I'm sorry, the problem is very deep into it's context, and I know it's

Problem with DB and Char size (2)

2005-01-27 Thread Santoemma Enrico
Oops... I hit the wrong key, sending a partial post. Sorry :) Again: I have a problem with strings and unicode chars, when writing slq statements on Oracle ODBC driver through HSQL. I'm writing here because I suspect that a fix could come from writing 8 bit strings, if it is possible somehow. I

Restricted Types and Infinite Loops

2005-01-27 Thread Simon David Foster
Hi, (I've attached the full code for this problem) First I'll explain the problem description, I have two class ClassA and ClassB, the former has two parameters and the latter has one. The second parameter of ClassA is constrained by ClassB. class ClassB a where class ClassB b => ClassA a b wher