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?
댓글 수: 0
답변 (2개)
Walter Roberson
2019년 6월 12일
isunicode was never part of MATLAB. It is https://www.mathworks.com/matlabcentral/fileexchange/10683-isunicode
댓글 수: 0
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!