[GHC] #1414: CString marshalling functions do not perform the specified conversion

GHC trac at galois.com
Wed Jun 18 10:13:59 EDT 2008


#1414: CString marshalling functions do not perform the specified conversion
----------------------------+-----------------------------------------------
 Reporter:  ross            |          Owner:             
     Type:  bug             |         Status:  new        
 Priority:  normal          |      Milestone:  6.10 branch
Component:  libraries/base  |        Version:  6.6.1      
 Severity:  major           |     Resolution:             
 Keywords:                  |     Difficulty:  Unknown    
 Testcase:                  |   Architecture:  Unknown    
       Os:  Unknown         |  
----------------------------+-----------------------------------------------
Changes (by PHO):

 * cc: pho at cielonegro.org (added)

Comment:

 Locale-based conversion will cause too much confusion, because C functions
 may take/return UTF-8 strings while your locale is something like
 ja_JP.eucJP. I strongly prefer to make withCString obsolete and introduce
 "withCString' :: Encoding -> String -> (CString -> IO a) -> IO a" (or such
 like) where data Encoding = UTF_8 | UTF_16 | ISO_8859_1 | ...

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1414#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list