Skip to content

Fread should exclude UTF-8 BOM from column names #1087

@nigmastar

Description

@nigmastar

Currently, fread seems to include the utf-8 BOM inside the file.

library(data.table)

# Create file

f <- "test_utf-8.csv"
cat(intToUtf8(c(239, 187, 191)), 'a,b,c\n1,2,3\n', file = f, sep = '')

# Import file

dt <- fread(f)
names(dt)
## [1] "a" "b"    "c"

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions