[
https://issues.apache.org/jira/browse/TIKA-5071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18150013#comment-18150013
]
ASF GitHub Bot commented on TIKA-5071:
--------------------------------------
DylanSYHoh commented on PR #3648:
URL: https://github.com/apache/tika/pull/3648#issuecomment-7117200297
> How about these 🤖 findings? wdyt?
>
> ```
> 1. Phonetic text lands inside the tag in .xlsx. The usual shape,
<si><t>kanji</t><rPh><t>yomi</t></rPh></si> in a superscript cell, comes out as
<sup>kanji yomi</sup>. The .xls path gives <sup>kanji</sup> yomi,
> which is what the PR description promises. The entry's runs are only
kept when some <r> has an <rPr>, so this one falls back to wrapping the whole
string. Fix: have <rPh> also mark the entry as having runs when
> phonetic runs are included.
> 2. Inline strings ignore runs. A t="inlineStr" cell with
<is><r>…</r><r><rPr><b/></rPr>…</r></is> in a superscript cell gives
<sup>xy</sup> instead of <sup>x</sup>y, and a vertAlign inside an inline string
is
> dropped. This is your earlier finding 2 on a path the fix didn't
reach. It is rare, so either fix it or add it to the "not covered" list next to
.xlsb.
>
> Hygiene
>
> - Extra allocation per plain shared string: every <si><t>…</t></si> in
every .xlsx now allocates a substring and a Run that are thrown away at the
next <si>.
> - Whole records retained: ExcelExtractor keeps full FontRecord and
ExtendedFormatRecord objects when it only needs a font index and a tag.
> ```
Thanks Tim, I missed these cases. Had an agent work through them, and
they're fixed in the latest commit.
Also cleaned up the hygiene items, and ended up caching the .xls format runs
per shared string after all.
The only plain-text change is that inline strings with a phonetic reading
now put a space before it like shared strings do, and leave it out when
phonetic runs are off.
> Keep superscript/subscript as sup/sub in xls and xlsx
> -----------------------------------------------------
>
> Key: TIKA-5071
> URL: https://issues.apache.org/jira/browse/TIKA-5071
> Project: Tika
> Issue Type: Improvement
> Reporter: Dylan Hoh
> Priority: Minor
>
> TIKA-5016 added sup/sub output for docx, pptx, doc, RTF and HTML, but Excel
> files still lose it, so "Hâ‚‚O" in a cell comes out as "H2O". The formatting is
> available in both xls and xlsx, in the shared strings' rich-text runs and in
> the cell font.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)