asterics / AsTeRICS

The Assistive Technology Rapid Integration & Construction Set
http://www.asterics.eu
Other
57 stars 27 forks source link

Special character in bundle descriptor #185

Closed ChrisVeigl closed 7 years ago

ChrisVeigl commented 7 years ago

Special characters in the bundle descriptor (e.g. german Umlaute in string constants for property default values) are not correctly transferred to the ACS via "Download Component Collection".

The reason might be a wrong character encoding of the .xml file or during the processing/transfer.

deinhofer commented 7 years ago

also consider XML special characters e.g. <> " / They should automatically be quoted.

deinhofer commented 7 years ago

all locations that open/store files on the ARE now use the respective methods from class ResourceRegistry:

Method to get the contents of a file encoded in UTF8 or UTF8 with BOM https://github.com/asterics/AsTeRICS/blob/master/ARE/middleware/src/main/java/eu/asterics/mw/services/ResourceRegistry.java#L607

method to store a resource encoded in UTF8 https://github.com/asterics/AsTeRICS/blob/master/ARE/middleware/src/main/java/eu/asterics/mw/services/ResourceRegistry.java#L640

The implementations use the library apache-commons-io and the class BOMInputStream to correctly deal with UTF8 with and without BOM http://www.rgagnon.com/javadetails/java-handle-utf8-file-with-bom.html https://commons.apache.org/proper/commons-io/javadocs/api-2.5/org/apache/commons/io/input/BOMInputStream.html

@TODO:

deinhofer commented 7 years ago

fixed in https://github.com/asterics/AsTeRICS/commit/c8f6ba3030d4ecbf4369b6cb5ae33289020c21bf and prior commits