Addition:
Current solution to this problemme that I was found is:
So I just check for BOM manually. Get length of bom.sequence and remove that count of items from beginning. But I dont' think that it's convenient solution, because `who knows` how much else issues with UTF could happend. And I don't think that it's correct to handle them on the side of users of standart D library... I think that should be solution "out of the box". It could be not much effective, but it should at least "just work" without extra movements...
string[] getGroupsFromFile(string groupFilePath)
{
        writeln(`Parse file` ~ groupFilePath);
        string[] groupNames = [];
        char[] rawContent = cast(char[]) read(groupFilePath);
        auto bom = getBOM(cast(ubyte[]) rawContent);
        string content = cast(string) rawContent[bom.sequence.length..$];
        writeln(`Content:\n` ~ content);

        //... work with XML
        return groupNames;
}

Reply via email to