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 comentarios

Sara
Sara el 26 de Jun. de 2014
Can you post an example of your cvs file? textscan has no problem if I build a string with such a character.

Iniciar sesión para comentar.

 Respuesta aceptada

Ken Atwell
Ken Atwell el 27 de Jun. de 2014

0 votos

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 comentario

harry
harry el 1 de Jul. de 2014
This information including Jose-Luis link led me to change the default character set encoding to 'US-ASCII' which resolved the problem.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Characters and Strings en Centro de ayuda y File Exchange.

Preguntada:

el 26 de Jun. de 2014

Comentada:

el 1 de Jul. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by