samer@43: % jfile - construct Java File object from path string samer@43: % jfile :: text -> java.io.File. samer@0: function f=jfile(path) samer@0: % The problem was that file names with accents in where not being found samer@0: % when converted to Java file names. samer@0: % I have no idea what is going on here but it seems to work samer@43: % f=java.io.File(java.lang.String(unicode2native(path,'latin1'),'UTF8')); samer@43: samer@43: % SA 2014: UPDATE samer@43: % Now I have a faint idea about what is going on here. Matlab ignores the samer@43: % LANG environment variable, and previously was using LATIN1 as it's samer@43: % feature('DefaultCharacterSet'). This meant that the entire Java subsystem samer@43: % was starting up with LATIN1 as its chacterset. Now, I have found a way samer@43: % to persuade Matlab to use Unicode, and indeed, for the JVM to use unicode samer@43: % also. This means that the old version of this function was no good. samer@43: % Instead, we should use unicode2native with no 2nd argument. samer@43: f=java.io.File(java.lang.String(unicode2native(path),'UTF8'));