title: My troubles creating MatLab table encoded in UTF-8
body: <p>I know that MatLab is not supposed to be ideal for this, but I wish to do some minimal work with my table-like data.dat file which looks like this:</p>
  
  <pre><code>ID,Name,Surname,Y,M,D,Num,Loc
  1672399390,A,DULKINAS,1993,01,31,3019,Šiauliai
  4157844163,D,SKARBALIUS,1993,12,08,3019,Tauragė
  5541091033,E,LUKOŠEVIČIUS,1992,10,25,3019,Panevėžys
  2005609387,M,DUBINSKAS,1991,03,31,3019,Kaunas
  2716651285,P,ŽIEDELIS,1992,02,28,3019,Vilnius
  </code></pre>
  
  <p>Since the data is neatly formatted and separated by commas I decided to simply use <code>readtable('data.dat')</code> and work from there.</p>
  
  <p>Problem 1. MatLab doesn't tell where the faulty line is. Since there were a couple of redundant commas, it just threw error <strong>Each line of a text file must have the same number of delimiters</strong>. I solved this by counting commas in every line using other tools and manually correcting them afterwards.</p>
  
  <p>Problem 2. For some reason it renames the first variable <code>ID</code> (which is AFAIK a valid not reserved variable name) to <code>x__ID</code>
  and gives a warning <strong>Variable names were modified to make them valid MATLAB identifiers</strong>. I don't really care about this one but it is weird.</p>
  
  <p>Problem 3. Well the UTF-8 symbols are not displayed correctly. Moreover after trying my luck with <a href="http://se.mathworks.com/help/matlab/ref/readtable.html" rel="nofollow">documentation</a> and running <code>readtable('data.dat','FileEncoding','UTF-8')</code> it gives me a flat out error <strong>Invalid parameter name: FileEncoding</strong>. I am confused.</p>
  
  <p>How should I approach this situation?</p>