Skip to content

CSV file encoded in UTF-8 with BOM #19

@jduchateau

Description

@jduchateau

When using a UTF-8 CSV file starting with a BOM, the BOM is not ignored.
Which brings this funny error message: Attribute Country Code does not exist. because it undoubtedly exists in the file.

@prefix ex: <http://example.com/> .
@prefix rml: <http://w3id.org/rml/> .

<http://example.com/base/TriplesMap1> a rml:TriplesMap;
  rml:logicalSource [ a rml:LogicalSource;
      rml:referenceFormulation rml:CSV;
      rml:source [ a rml:RelativePathSource;
          rml:root rml:MappingDirectory;
          rml:path "country_info.csv"
        ]
    ];
  rml:predicateObjectMap [
      rml:objectMap [
          rml:reference "Name"
        ];
      rml:predicate ex:name
    ];
  rml:subjectMap [
      rml:template "http://example.com/{Country Code}"
    ] .

CSV File with ZWNBSP/BOM.

Country Code,Name,ISO 3166
1,"Bolivia, Plurinational State of",BO
2,"Ireland",IE
3,"Saint Martin (French part)",MF

Data from test RMLTC0010a-CSV, adapted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions