Which version can support the naming of m files in Chinese and the use of space naming?
1 次查看(过去 30 天)
显示 更早的评论
excuse me,Which version can support the naming of m files in Chinese and the use of space naming?
thanks a lot!!!
0 个评论
采纳的回答
Walter Roberson
2019-4-22
编辑:Walter Roberson
2019-4-24
On all versions, function names (and the last component of the names of .m files) can only use A-Z, a-z, 0-9, and underscore.
In all versions, some third-party tools, such as code generation tools for hardware, have problems with spaces in file names or directory names.
In all versions, using "mex" from the command line can have problems with spaces in file names or directory names, or at least that was the case until recently. "mex" used to be able to accept proper file names, but then it used to create a long text command and use system() with it, and that command had problems with not protecting file names. Perhaps this was fixed.
In MS Windows especially, it is not uncommon to find parts of Simulink that have problems with spaces in file names or directory names or non-English characters in file names.
MATLAB for Mac and Linux appear to have fewer problems with file names or directory names that have spaces in them or non-English characters in file names.
In order to use Chinese or Japanese or Korean in text and comments, MATLAB needs to detect you are on a CJK system, and then it enables UTF-8 encoding of files. In other areas that are not English, sometimes it enables UTF-8 . In USA and Canada, it seldom enables UTF-8 for files unless you edit a configuration file to force it to use UTF-8. This is something that needs improvement from Mathworks.
If you are using Chinese on MS Windows, then you may encounter problems with Simulink and you will probably encounter problems with some third-party tools.
2 个评论
Walter Roberson
2019-4-22
Yes, including R2019a.
The commonly used third-party tools tend to get better over time, but Mathworks keeps adding more third-party tools, especially for hardware support packages, so problems with spaces in filenames or directory names keep happening.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Naming Conventions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!