Is there an equivalent function in Matlab 2019 to the earlier version's isunicode function?

1 view (last 30 days)
Or is there any other way to read a file and delete the unicode characters?

Answers (2)

Walter Roberson
Walter Roberson on 12 Jun 2019

Rik
Rik on 12 Jun 2019
The isunicode function may look promissing, but doesn't actually work on my test files (generated with Notepad++). The same problem occurred with Walter's detect_UTF_encoding function (for which I appear to have misplaced the thread it was posted in). Trying to detect the encoding is a tricky business.
But if you want to remove any Unicode chars you can also use my readfile FEX submission. It will try to determine if a file contains UTF8 chars and will handle the conversion. You should be able to use this function to read your file and discard any >128 chars.
Note that if you're using Matlab 6.5 or GNU Octave, some restrictions apply to what files are read succesfully.

Categories

Find more on Data Type Conversion in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!