[ 
https://issues.apache.org/jira/browse/TIKA-359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798090#action_12798090
 ] 

Ken Krugler commented on TIKA-359:
----------------------------------

Given the junk that can be found inside of meta http-equiv tags for HTML 
documents, what's needed is a routine that tries to clean up the charset 
(removing junk like quotes), expands the set of aliases to handle common types 
(like cp-1252 vs. cp1252), and then returns null or a 
valid/normalized/supported charset name.

I've got the first cut of something like this in Bixo, which I'll turn into a 
utility routine/patch for Tika.

> Calls to Charset.isSupported() will throw exceptions for invalid charset names
> ------------------------------------------------------------------------------
>
>                 Key: TIKA-359
>                 URL: https://issues.apache.org/jira/browse/TIKA-359
>             Project: Tika
>          Issue Type: Bug
>    Affects Versions: 0.5
>            Reporter: Ken Krugler
>            Assignee: Ken Krugler
>             Fix For: 0.6
>
>
> The HtmlParser and TXTParser code currently call Charset.isSupported() to 
> determine if charset hint info (from meta tags or incoming metadata).
> But this method throws IllegalCharsetNameException for unknown (versus 
> unsupported) encoding names, which kills the parsing process.
> What's needed is a wrapper that catches this exception and returns false.

-- 
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