[ 
https://issues.apache.org/jira/browse/FLUME-2215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14561270#comment-14561270
 ] 

ASF subversion and git services commented on FLUME-2215:
--------------------------------------------------------

Commit 344e0accae5675fd3d14b8414531528607865aae in flume's branch 
refs/heads/trunk from [~hshreedharan]
[ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=344e0ac ]

FLUME-2215. ResettableFileInputStream can't support ucs-4 character

(Alexandre Dutra via Hari)


> ResettableFileInputStream can't support  ucs-4 character
> --------------------------------------------------------
>
>                 Key: FLUME-2215
>                 URL: https://issues.apache.org/jira/browse/FLUME-2215
>             Project: Flume
>          Issue Type: Bug
>    Affects Versions: v1.5.0
>            Reporter: syntony liu
>            Assignee: Santiago M. Mola
>            Priority: Critical
>              Labels: patch
>         Attachments: 
> 0001-FLUME-2215-Fixes-reading-surrogate-based-chars.patch, 
> FLUME-2215-0-README.txt, FLUME-2215-0.patch, FLUME-2215-1-README.txt, 
> FLUME-2215-1.patch
>
>
> ResettableFileInputStream.java:readChar() not handle ucs-4 character. it need 
> 2 charBuf. it cause an unexpected termination。
>  a temporary solution:
>      if (res.isOverflow() && !charBuf.hasRemaining()){ 
>          logger.warn("decoder ucs-4 at postion: {}" , buf.position()); 
>         tmpBuf.clear();  
>         res = decoder.decode(buf, tmpBuf, isEndOfInput); 
>         incrPosition( buf.position() - start, false); 
>        return '?'; 
>      } 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to