I'm using the Javascript files outputted by GWT in a Windows 8.1 app, however as well as being UTF-8 encoded the files also need the Byte Order Mark at the start.
(See this question for why: http://social.msdn.microsoft.com/Forums/windowsapps/en-US/dd352270-8790-4b48-8492-17a4a6875e99/why-the-utf8-with-bom-marker-requirement )
Not sure if it's relevant, but I'm building GWT using Maven.
Is there anything I can change in the Maven pom.xml file that will output the files encoded in UTF-8 with the BOM?
Or a change to GWT config file?
Thank you for your help, I've been trying to figure this one out all afternoon!
Just in case anyone stumbles across this question in the future and wants an answer...
I couldn't find a way to do this with GWT, so I added some code to a
.batbuild script that runs.Before running this script you will need to save an empty file (
filewithbom.txt) that contains only the UTF-8 Byte Order Marker (0xEF 0xBB 0xBFif you're interested). This can be done by saving an empty file in Notepad, and being sure to set the encoding to UTF-8.You will also want to change the
CHANGE_DIRdirectory.This loops through the
CHANGE_DIRdirectory and it's subfolders, and adds the contentsfilewithbom.txtto the start of every file with a filename ending.jsor.html.