Textscan can't read letters with acents

Hi I am trying to read a csv file of names which include some names with accented letters such as the lower case version of "Á" (can't find a lower case a with an accent on my keyboard). Textscan just ignores the character. Any ideas how we can read these characters with text?

댓글 수: 2

Sara
Sara 2014년 6월 26일
Can you post an example of your cvs file? textscan has no problem if I build a string with such a character.

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

 채택된 답변

Ken Atwell
Ken Atwell 2014년 6월 27일

0 개 추천

A .CSV file is an ASCII file without character set encoding information. You might need to experiment with different encodings to stumble upon the one the file was created with.
See the documentation for the optional encodingIn parameter to fopen for a discussion.

댓글 수: 1

harry
harry 2014년 7월 1일
This information including Jose-Luis link led me to change the default character set encoding to 'US-ASCII' which resolved the problem.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Characters and Strings에 대해 자세히 알아보기

질문:

2014년 6월 26일

댓글:

2014년 7월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by