Thanks for the ideas.
In this case, ssh, it is a transfer layer protocol, which means it
does not convert anything. For example the server was using ascii, and
the client was using ascii, then good. If the client was using UTF-8
instead, then he might get a broken display, ssh itself would not
Hi,
What would you be using the CString for? A CString is really a lot
less useful than a ByteString for almost all purposes. If I allready
had a ByteString, the only reason I would want to convert it to a
CString is to call a C function.
Take care,
Antoine
On Sun, Dec 26, 2010 at 7:40 PM,
Sorry, I just noticed that I had a misunderstanding here.
With encode and bytestring hackages, I think it should be OK for my requirement.
On Mon, Dec 27, 2010 at 10:32 AM, Antoine Latter aslat...@gmail.com wrote:
Hi,
What would you be using the CString for? A CString is really a lot
less
On Thu, 2010-12-23 at 14:15 +0800, Magicloud Magiclouds wrote:
On Thu, Dec 23, 2010 at 2:01 PM, Mark Lentczner ma...@glyphic.com wrote:
On Dec 22, 2010, at 9:29 PM, Magicloud Magiclouds wrote:
Thus under all situation (ascii, UTF-8, or even
UTF-32), my program always send 4 bytes through
On 23 December 2010 05:29, Magicloud Magiclouds
magicloud.magiclo...@gmail.com wrote:
If so, OK, then I think I could make a packInt which turns an Int
into 4 Word8 first. Thus under all situation (ascii, UTF-8, or even
UTF-32), my program always send 4 bytes through the network. Is that
OK?
Hi,
Recently, I am reading ssh hackage
(http://hackage.haskell.org/package/ssh). When at the part of deal
with string, I got confused. I am not sure if this is a bug for the
hackage, or I am just misunderstanding.
An ascii char takes a Word8. So this works (LBS stands for
On Dec 22, 2010, at 9:29 PM, Magicloud Magiclouds wrote:
Thus under all situation (ascii, UTF-8, or even
UTF-32), my program always send 4 bytes through the network. Is that
OK?
Generally, no.
Haskell strings are sequences of Unicode characters. Each character has an
integral code point
On Thu, Dec 23, 2010 at 2:01 PM, Mark Lentczner ma...@glyphic.com wrote:
On Dec 22, 2010, at 9:29 PM, Magicloud Magiclouds wrote:
Thus under all situation (ascii, UTF-8, or even
UTF-32), my program always send 4 bytes through the network. Is that
OK?
Generally, no.
Haskell strings are