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 Comments

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.
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".

Sign in to comment.

Answers (0)

Products

Release

R2022a

Asked:

on 14 Jun 2022

Commented:

on 14 Jun 2022

Community Treasure Hunt

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

Start Hunting!