[ 
https://issues.apache.org/jira/browse/CXF-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

calvin xiu updated CXF-1856:
----------------------------

          Description: 
LoggingOutInterceptor  use org.apache.cxf.io.CachedOutputStream to write the 
log.

in  CachedOutputStream  public void writeCacheTo(StringBuilder out) 

  out.append(((ByteArrayOutputStream)currentStream).toString();

It use the platform default encoding to write the log!!!!

in a chinese server, the default encoding is GBK, but the program is UTF-8, the 
clause should change to
 
  out.append(((ByteArrayOutputStream)currentStream).toString("UTF-8")


should LoggingOutInterceptor  pass  LoggingMessage's encoding message  to 
CachedOutputStream ?


  was:
LoggingOutInterceptor  use org.apache.cxf.io.CachedOutputStream the write the 
log.

in  CachedOutputStream 's  method:

 public void writeCacheTo(StringBuilder out) 

  out.append(((ByteArrayOutputStream)currentStream).toString();

use the platform default encoding the write logs.

in a chinese computor,the default encoding is GBK, but the program is UTF-8, 
should change to
 
  out.append(((ByteArrayOutputStream)currentStream).toString("UTF-8")


should LoggingOutInterceptor  pass the encoding in LoggingMessage to the  
CachedOutputStream ?


    Affects Version/s:     (was: 2.1.1)
                       2.1.2

> LoggingOutInterceptor has encoding problem and solution
> -------------------------------------------------------
>
>                 Key: CXF-1856
>                 URL: https://issues.apache.org/jira/browse/CXF-1856
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.1.2
>            Reporter: calvin xiu
>
> LoggingOutInterceptor  use org.apache.cxf.io.CachedOutputStream to write the 
> log.
> in  CachedOutputStream  public void writeCacheTo(StringBuilder out) 
>   out.append(((ByteArrayOutputStream)currentStream).toString();
> It use the platform default encoding to write the log!!!!
> in a chinese server, the default encoding is GBK, but the program is UTF-8, 
> the clause should change to
>  
>   out.append(((ByteArrayOutputStream)currentStream).toString("UTF-8")
> should LoggingOutInterceptor  pass  LoggingMessage's encoding message  to 
> CachedOutputStream ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to