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

1 visualizzazione (ultimi 30 giorni)
Or is there any other way to read a file and delete the unicode characters?

Risposte (2)

Walter Roberson
Walter Roberson il 12 Giu 2019

Rik
Rik il 12 Giu 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.

Categorie

Scopri di più su Data Type Conversion in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by