Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

fs.readFileSync(filename, 'utf8') doesn't strip BOM markers #1918

@dobesv

Description

@dobesv

Environment: cloud9ide.com, node version 0.4.5

If I read a file using fs.readFileSync(filename, 'utf8') that is encoded using UTF8 with BOM, the BOM is included in the resulting string.

I think the routine to decode UTF8 is supposed to automatically strip the BOM from the start of the stream before returning the string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions