[GHC] #3455: Add a setting to change how Unicode encoding errors are handled

2009-08-23 Thread GHC
#3455: Add a setting to change how Unicode encoding errors are handled
-+--
Reporter:  judahj|  Owner:  
Type:  proposal  | Status:  new 
Priority:  normal|  Component:  libraries/base  
 Version:  6.10.4|   Severity:  normal  
Keywords:|   Testcase:  
  Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-+--
 I proposal that we augment ghc-6.12.1's support for Unicode Handles
 by adding the following functions to System.IO:

 {{{
 hSetOnEncodingError :: Handle -> OnEncodingError -> IO ()
 hGetOnEncodingError :: Handle -> IO OnEncodingError
 }}}

 as well as the enumeration `OnEncodingError` with three constructors:

  - `ThrowEncodingError`: Throw an exception at the first encoding or
 decoding
error.
  - `SkipEncodingError`: Skip all invalid bytes or characters.
  - `TranslitEncodingError`: Replace undecodable bytes with u+FFFD, and
 unencodable characters with '?'.

 I have implemented this functionality in the attached patch.  Haddock docs
 are here:
 http://code.haskell.org/~judah/new-io-docs/System-IO.html#23


 The choice of error handler is orthogonal to the choice of encoder.
 Additionally, the same setting is used for both read and write modes.  For
 portability, the handlers are written in pure Haskell rather than using
 GNU
 iconv's //TRANSLIT feature.

 Note that the text package, for example, provides more sophisticated
 error-handling options.  However, I think the above choices are useful
 enough
 without making the API too complicated.


 Discussion deadline: September 9

 Haddock docs:
 http://code.haskell.org/~judah/new-io-docs/System-IO.html#23

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #3455: Add a setting to change how Unicode encoding errors are handled

2009-08-23 Thread GHC
#3455: Add a setting to change how Unicode encoding errors are handled
-+--
Reporter:  judahj|Owner:  
Type:  proposal  |   Status:  new 
Priority:  normal|Milestone:  Not GHC 
   Component:  libraries/base|  Version:  6.10.4  
Severity:  normal|   Resolution:  
Keywords:|   Difficulty:  Unknown 
Testcase:|   Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
-+--
Changes (by igloo):

  * difficulty:  => Unknown
  * milestone:  => Not GHC

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #3455: Add a setting to change how Unicode encoding errors are handled

2009-08-24 Thread GHC
#3455: Add a setting to change how Unicode encoding errors are handled
-+--
Reporter:  judahj|Owner:  
Type:  proposal  |   Status:  new 
Priority:  normal|Milestone:  Not GHC 
   Component:  libraries/base|  Version:  6.10.4  
Severity:  normal|   Resolution:  
Keywords:|   Difficulty:  Unknown 
Testcase:|   Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
-+--
Comment (by simonmar):

 It looks like the main question here is whether the `IOError` should be
 returned explicitly (as in your patch), or whether we should just catch
 the exception.  All things being equal, catching the exception would be
 simpler, as it wouldn't require any changes in the codecs.  Is there a
 reason why you didn't do it that way?  Perhaps because you want to be sure
 that the exception is really an encoding error, and not some other kind of
 exception?  If that's the case, then we should introduce a new exception
 for encoding errors (that's probably a good idea anyway).

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #3455: Add a setting to change how Unicode encoding errors are handled

2010-06-20 Thread GHC
#3455: Add a setting to change how Unicode encoding errors are handled
-+--
  Reporter:  judahj  |  Owner:  
  Type:  proposal| Status:  closed  
  Priority:  normal  |  Milestone:  Not GHC 
 Component:  libraries/base  |Version:  6.10.4  
Resolution:  wontfix |   Keywords:  
Difficulty:  Unknown | Os:  Unknown/Multiple
  Testcase:  |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown|  
-+--
Changes (by igloo):

  * status:  new => closed
  * failure:  => None/Unknown
  * resolution:  => wontfix


Comment:

 Looks like an abandoned proposal. If that's not the case, please re-open
 and give a discussion summary and consensus decision, as described on the
 [http://www.haskell.org/haskellwiki/Library_submissions process page].

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs