Peter Gummer wrote:
> Adam Flinton wrote:
>   
>> Equally if a text editor opens an ADL, assumes UTF-8 & puts on a BOM 
>> then the Archetype editor dies ...  
>>     
>
> I assume you mean the Java Archetype Editor, Adam. The Ocean Archetype 
> Editor accepts ADL files with or without the BOM.
>   
I am pretty sure that recent versions of the Java Parser won't mind the 
BOM being present.
The Java Archetype Editor may still use an old version of the parser?

> There are pros and cons whether tools should put a BOM at the start of 
> ADL files.
>
> * As Thomas pointed out, tools that are not Unicode-aware may blow up if 
> the BOM is present.
>
> * On the other hand, if you omit the BOM then Unicode-aware tools have a 
> big problem when they open a file. What encoding should they assume? 
> Some tools like Windows Notepad seem to be very clever at figuring it 
> out, but others that I have tried in the past (Visual Studio 2005, Vim 
> 6.4 and Mac TextEdit) misinterpret BOM-less UTF-8 files as Latin-1.
>   
That's why my assumption till now was that the BOM is optional [but not 
forbiddedn] for UTF-8 - and also is of some additional value to 
differentiate between UTF-8 and ISO-8859-1 (as long as you assume that a 
text doesn't start with ??? - the BOM in ISO, one can safely 
differentiate between the two without problems)

Sebastian


Reply via email to