Umlauts in cell HTML #505

Closed
opened 2016-11-21 09:28:22 +00:00 by fuchsc · 2 comments
fuchsc commented 2016-11-21 09:28:22 +00:00 (Migrated from github.com)

Hi,

I'm having an issue with HTML formatted text containing umlauts. My xlsx worksheet has cells containing umlauts. The raw value (cell.v) looks good, but I'd like to preserve the cell formatting and therefore I use cell.h to get the HTML formatted text. Regarding formatting the value looks good but the umlauts (ö, ü, ä) are not converted correctly.

Is there anything I can do to get correct encoded HTML?

thx in advance!

Hi, I'm having an issue with HTML formatted text containing umlauts. My xlsx worksheet has cells containing umlauts. The raw value (cell.v) looks good, but I'd like to preserve the cell formatting and therefore I use cell.h to get the HTML formatted text. Regarding formatting the value looks good but the umlauts (ö, ü, ä) are not converted correctly. Is there anything I can do to get correct encoded HTML? thx in advance!
qqilihq commented 2017-02-17 17:19:36 +00:00 (Migrated from github.com)

FYI: I'm having the same issue. I just sent a detailed description with a test case and data to sheetjs@gmail.com.

FYI: I'm having the same issue. I just sent a detailed description with a test case and data to sheetjs@gmail.com.
SheetJSDev commented 2017-02-17 20:39:03 +00:00 (Migrated from github.com)

Thanks @fuchsc @qqilihq I looked at the file, the fix for the HTML is to do a utf8 conversion first:

https://github.com/SheetJS/js-xlsx/blob/master/bits/42_sstxml.js#L152-L154 should be

		z.r = utf8read(x);
		z.t = utf8read(unescapexml((x.match(sitregex)||[]).join("").replace(tagregex,"")));
		if(html) z.h = parse_rs(z.r);
Thanks @fuchsc @qqilihq I looked at the file, the fix for the HTML is to do a utf8 conversion first: https://github.com/SheetJS/js-xlsx/blob/master/bits/42_sstxml.js#L152-L154 should be ```js z.r = utf8read(x); z.t = utf8read(unescapexml((x.match(sitregex)||[]).join("").replace(tagregex,""))); if(html) z.h = parse_rs(z.r); ```
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#505
No description provided.