Skip to content

improve UTF8 support  #71

@robertoostenveld

Description

@robertoostenveld

With http://github.com/fieldtrip/fieldtrip we are using jsonlab in the data2bids function. @DidiLamers identified a problem when converting a dataset with an author (which goes in the dataset_description.json) that had a non-ascii character in her name (in fact, it was the letter "í", with an acute accent). The BIDS validator subsequently complained that the json is not UTF8; also opening the json file file in the Atom editor resulted in the character being shown correctly.

It might be that this is solved already in version 2.0; we are now shipping FieldTrip with jsonlab version 1.5.

If the limitation is still there in 2.0, I would like to discuss whether this can be solved on the jsonlab-side.

An alternative that I see is that around https://github.com/fieldtrip/fieldtrip/blob/2a67cb59746eb81fe05bc118c96d5f257a63f51c/data2bids.m#L2208
we introduce some extra code to deal with this, like reading the json file and writing it back with UTF8 encoding.

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