Open GoogleCodeExporter opened 9 years ago
So what if I have code that's like
if (x == 'bom char')
where the bom char is encoded as utf8 -- then this will just remove it, no?
You should only ever remove it if it is the very first char in the file, and
only if the input encoding is utf8. (Although it's difficult to imagine this
sequence of bytes being a valid beginning of a file in any other encoding.)
Might be better to handle this directly in closure compiler since it has all
the encoding information at its disposal.
Original comment by ibmirkin@gmail.com
on 3 Jan 2012 at 4:50
Absolutely correct, my apologies attached checks for startswith and just
replaces those 3 characters.
It may be more elegant to do proper encoding check but I'm unfortunately
alergic to python so this is my hack.
Also we cannot use the compiler to do this as running output_mode=script does
not compile.
Original comment by guido.tapia@gmail.com
on 3 Jan 2012 at 5:08
Attachments:
assigning to self, will investigate
Original comment by nn...@google.com
on 11 May 2012 at 7:47
Original issue reported on code.google.com by
guido.tapia@gmail.com
on 3 Jan 2012 at 3:32Attachments: