dymosoftware / dymo-connect-framework

DYMO Connect Framework for Javascript.
Other
86 stars 54 forks source link

Framework fails to decode template files with UTF-8 Byte Order Mark #45

Open timint opened 2 years ago

timint commented 2 years ago

I found a critical bug.

The DCM software saves a *.dymo label with a Byte Order Mark (BOM). When passing the contents of the .dymo file to dymo.label.framework.openLabelXml() it fails to decode the XML saying it's invalid. Removing the byte order mark solves the problem.

Byte Order Mark is generally a bad approach. Here are your alternatives for a fix: A) Either implement support for BOM in the DYMO Framework. B) Or stop inserting the byte order mark when using the DCD software.

image

Regex for matching the BOM /^\ufeff/

This bug makes any labels created with the DCD Software invalid for use with the DYMO Framework.

timint commented 1 year ago

@dymosoftware This is an incompatibility issue of DYMO Connect generated labels not being compatible with the Web Service. Why is this being ignored?