Bug 66871 - TargetURI in Relationship is overwritten with utf-8 encoded string
Summary: TargetURI in Relationship is overwritten with utf-8 encoded string
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: OPC (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-09 00:55 UTC by Yu Sa
Modified: 2023-10-17 17:31 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yu Sa 2023-08-09 00:55:11 UTC
Overview: 
When you link a sheet cell that uses multi-byte characters in a shape, the link is overwritten with a UTF-8 encoded string after writing the data, making the link unusable.
Looking at the .rels file, the Target element is UTF-8 encoded.

Steps to Reproduce:
1) Create a sheet with multibyte characters.
2) Insert a shape and link any cell of the sheet created in 1 to that shape
3) Read a file with the XSSFWorkbook class and write arbitrary data with the XSSFWorkbook.write() method
4) The link added in 2 becomes a string encoded in UTF-8 and cannot be used as a link.

Actual Results:
link is not be used.

Expected Results:
Links can be used even after writing data.

Build Date & Hardware:
Version 5.1.0 (2021-11-01)