Community
Participate
Working Groups
setDocumentContent has a bom check for excluding the bom from the editable document. the checks look like this: FileInfo info= (FileInfo) getElementInfo(element); if (info != null && info.fHasBOM && CHARSET_UTF_8.equals(encoding)) { .. } but the cached flag fHasBOM of the FileInfo is created after setDocumentContent is called. in createElementInfo is called in connect setDocumentContent is called before cacheEncodingState in createElementInfo. same problem with doSaveDocument but i have not debugged it. i have fixed that problem for the ASDT plugin with a uncached check.
Works when using file buffer based document provider (e.g. TextFileDocumentProvider).
This needs to be fixed for 3.1.1.
Fixed in HEAD and R3_1_maintenance. Will be released into 3.2 M2 and 3.1.1.
verifying...
verified that a UTF-8 with BOM file opened with an editor using FileDocumentProvider works correctly: - encoding is UTF-8 with BOM - no additional characters displayed