You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Keunil Yoon (Created) (JIRA)" <ji...@apache.org> on 2012/03/27 03:09:25 UTC

[jira] [Created] (CXF-4208) MultiByte Character is broken

MultiByte Character is broken
-----------------------------

                 Key: CXF-4208
                 URL: https://issues.apache.org/jira/browse/CXF-4208
             Project: CXF
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.5.2
         Environment: Web Application on Tomcat 6.0.32
            Reporter: Keunil Yoon


Hi.
I am using org.apache.cxf.io.CacheAndWriteOutputStream class and writeCacheTo method.
As I know when message over 64kb, messese written to file system (Cache) and read.
But when reading It get 1024byte from file and convert to new String like this

IOUtils.newStringFromBytes(bytes, charsetName, 0, x)

When multi-byte data (ex. Korean) is broken when reading from file system cache.
Because data is consisted by multi byte charaters.

How I can fix this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CXF-4208) MultiByte Character is broken

Posted by "Daniel Kulp (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-4208.
------------------------------

       Resolution: Not A Problem
    Fix Version/s: Invalid
         Assignee: Daniel Kulp


Not really a bug.  The CachedOutputStream and related stuff is byte oriented, not character, and thus must be treated as a complete binary blob. 
                
> MultiByte Character is broken
> -----------------------------
>
>                 Key: CXF-4208
>                 URL: https://issues.apache.org/jira/browse/CXF-4208
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.5.2
>         Environment: Web Application on Tomcat 6.0.32
>            Reporter: Keunil Yoon
>            Assignee: Daniel Kulp
>             Fix For: Invalid
>
>
> Hi.
> I am using org.apache.cxf.io.CacheAndWriteOutputStream class and writeCacheTo method.
> As I know when message over 64kb, messese written to file system (Cache) and read.
> But when reading It get 1024byte from file and convert to new String like this
> IOUtils.newStringFromBytes(bytes, charsetName, 0, x)
> When multi-byte data (ex. Korean) is broken when reading from file system cache.
> Because data is consisted by multi byte charaters.
> How I can fix this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4208) MultiByte Character is broken

Posted by "Daniel Kulp (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239644#comment-13239644 ] 

Daniel Kulp commented on CXF-4208:
----------------------------------


With any multi-byte charset you won't be able to reliably grab a small chunk of bytes and be able to convert that to a string.   Your best bet is to do a new InputStreamReader(inputStream) to create a reader and then read a chunk of char's.   

                
> MultiByte Character is broken
> -----------------------------
>
>                 Key: CXF-4208
>                 URL: https://issues.apache.org/jira/browse/CXF-4208
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.5.2
>         Environment: Web Application on Tomcat 6.0.32
>            Reporter: Keunil Yoon
>
> Hi.
> I am using org.apache.cxf.io.CacheAndWriteOutputStream class and writeCacheTo method.
> As I know when message over 64kb, messese written to file system (Cache) and read.
> But when reading It get 1024byte from file and convert to new String like this
> IOUtils.newStringFromBytes(bytes, charsetName, 0, x)
> When multi-byte data (ex. Korean) is broken when reading from file system cache.
> Because data is consisted by multi byte charaters.
> How I can fix this.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira