Re: [PATCH] Bug 43477 - Unicode error mode ignored
| From: | Stephen Bach | Date: | Tue, 18 Mar 2008 19:37:16 +0000 |
| Subject: | Re: [PATCH] Bug 43477 - Unicode error mode ignored | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-36198@lists.php.net to get a copy of this message | ||
I'm just suggesting that other error modes should do what they claim to do.
Stopping on an illegal sequence is fine, unless the user had called a
function telling the converter to do something else.
U_CONV_ERROR_STOP: stops on illegal character (the default)
U_CONV_ERROR_ESCAPE_*: 5 different modes that escape the illegal sequence in
various ways
Shouldn't U_CONV_ERROR_SKIP and U_CONV_ERROR_SUBST work the same way?
-Stephen
On Tuesday 18 March 2008 01:43:13 pm Andrei wrote:
> Why would we not want to stop on illegal sequences?
>
> -Andrei
>
> Stephen Bach wrote:
> > Attached is a simple proposed patch that fixes Bug 43477. Basically, the
> > code that set the error mode of the ICU converter was giving it an
> > instruction (the context parameter) to only skip or substitute if the
> > code point was not represented in the new encoding. However, it still was
> > returning an error for illegal sequences.
> >
> > The test suite returns the same results with or without the patch. Test
> > also attached.
> >
> > -Stephen Bach