torvin
torvin

Reputation: 43

Converting Danish special characters

I'm trying to read a .csv file for my script, but the script contains the special danish characters "æ","ø" and "å". So far my idea was to define it like this:

CellM = readtable(csvdata,'Format','%æ%ø%å%s');

but it's not working.

Upvotes: 0

Views: 162

Answers (1)

Dev-iL
Dev-iL

Reputation: 24169

You can specify the file encoding when you call readtable:

readtable(..., 'Encoding', 'UTF-8');

This should solve your problem, assuming you didn't use another function on csvdata, earlier, which already messed your data up.

Upvotes: 2

Related Questions