Bug 58755

Summary: POI can't encode hyperlink relation is not valid java.util.URI
Product: POI Reporter: Andrey <andrey.bardashevsky>
Component: OPCAssignee: POI Developers List <dev>
Status: NEEDINFO ---    
Severity: major    
Priority: P2    
Version: 3.13-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Andrey 2015-12-20 00:17:09 UTC
poi can't encode following hyperlink #'Прайс-лист'!A1

issue is in org.apache.poi.openxml4j.opc.PackagingURIHelper#isUnsafe


instead of ch > 0x80 should be ch >= 0x80


private static boolean isUnsafe(int ch) {
    return ch >= 0x80 || Character.isWhitespace(ch) || ch == '\u00A0';
Comment 1 Nick Burch 2015-12-21 16:38:11 UTC
Any chance you could write a short junit unit test showing the problem? We can then use that to confirm the fix, and also to ensure it stays fixed into the future