A couple of suggested improvements for the patch:

- Perform the encoding check once, in the constructor, and save a boolean instance variable, to save lots of unnecessary String.equals() calls.
- Support all of the Unicode encodings, which as of 1.4.2 were:

UTF-8

UTF8

Eight-bit UCS Transformation Format

UTF-16

UTF-16

Sixteen-bit UCS Transformation Format, byte order identified by an optional byte-order mark

UTF-16BE

UnicodeBigUnmarked

Sixteen-bit Unicode Transformation Format, big-endian byte order

UTF-16LE

UnicodeLittleUnmarked

Sixteen-bit Unicode Transformation Format, little-endian byte order


-- Adam


On 10/4/05, Martin Marinschek (JIRA) <[email protected] > wrote:
     [ http://issues.apache.org/jira/browse/MYFACES-272?page=all ]

Martin Marinschek closed MYFACES-272:
-------------------------------------

    Resolution: Fixed
     Assign To: Martin Marinschek

Thanks to Kalle Korhonen for this patch!

> MyFaces unnecessary encodes all non-latin characters as numeric character references even if response character encoding is set to UTF-8
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: MYFACES-272
>          URL: http://issues.apache.org/jira/browse/MYFACES-272
>      Project: MyFaces
>         Type: Improvement
>   Components: Implementation
>     Versions: 1.1.0
>     Reporter: Kalle Korhonen
>     Assignee: Martin Marinschek
>  Attachments: myfaces-272-conditionallyEncodeChars.patch
>
> Encoding all non-latin characters is unnecessary if the response specifies UTF-8 as character encoding and causes a major performance hit. Will provide a patch to do this only when UTF-8 is not used as encoding.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Reply via email to