Unicode characters in MATLAB source files

后端 未结 5 1547
执笔经年
执笔经年 2020-11-30 05:55

I\'d like to use Unicode characters in comments in a MATLAB source file. This seems to work when I write the text; however, if I close the file and reload it, \"unusual\" ch

5条回答
  •  余生分开走
    2020-11-30 06:34

    The solution provided here worked for me on Windows with R2018a.

    In case link doesn't work: the idea is to use file matlabroot/bin/lcdata.xml to configure an alias for encoding name (some explanation can be found in this very file in the comments):

    
      
       
      
    
    

    You would use your own value instead of windows-1252, currently used encoding can be obtained by running feature('locale').

    Although, if you use Unicode characters in help comments, the help browser does not recognize them, as well as console window output.

提交回复
热议问题