Skip to content

Pass encoding to readFile #4

Description

@humphd

In https://github.com/tcvan0707/txt2html/blob/main/src/txt2html.js#L36 you cast to a string. A better way to do this is to request that node encode the resulting buffer as a utf-8 string:

const text = await fs.readFile(filePath, 'utf-8');

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