Skip to content

UTF-8 BOM #15

@slkom

Description

@slkom

ParseStream()
{
....
for (int lnc = 1; !stream.eof(); lnc++)
{
std::string line;
std::getline(stream,line);
// rem utf-8 bom
if (1 == lnc
&& line.length() > 2
&& 0xefbbbf == ((line[2] & 0xff) | ((line[1] << 8) & 0xff00) | ((line[0] << 16) & 0xff0000))) {
line = line.substr(3);
}
trim(line);
....
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions