Recognizing special characters such as "ç" or "ã"

I'm using textread to read a word list written with Portuguese specific characters (such as "ç" or "ã"). Unfortunately, Matlab seems not to recognize such characters - in reads 'mundializa??o' or alike instead of "mundialização" (I do not know why, since in older versions I do not had this problem). Any clue about what I have to to do solve this situation?
Thank you very much.

댓글 수: 3

C = readcell('test.txt')
C = 1×1 cell array
{'ãbçd'}
S = readlines('test.txt')
S = "ãbçd"
T = fileread('test.txt')
T = 'ãbçd'
Please upload a sample data file by clicking the paperclip button.
Luis Faisca
Luis Faisca 2022년 6월 14일
편집: Luis Faisca 2022년 6월 14일
Thank you - I just added a "teste.txt" file with Portuguese words with special characters. Please, check. What my Matlab prints is
{'abafadi?o' }
{'abal?vel' }
{'abalroa??o'}
Perhaps this could be an idiosyncrasy of the "textread" function. If I use the "readcell" function, as you suggested, special characters are recognized.
Thank you for help, I will proceed with "readcell".

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

제품

릴리스

R2022a

질문:

2022년 6월 14일

댓글:

2022년 6월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by