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

조회 수: 1 (최근 30일)
Or is there any other way to read a file and delete the unicode characters?

답변 (2개)

Walter Roberson
Walter Roberson 2019년 6월 12일

Rik
Rik 2019년 6월 12일
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.

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by