Which version can support the naming of m files in Chinese and the use of space naming?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
dcydhb dcydhb
le 22 Avr 2019
Modifié(e) : Walter Roberson
le 24 Avr 2019
excuse me,Which version can support the naming of m files in Chinese and the use of space naming?
thanks a lot!!!
0 commentaires
Réponse acceptée
Walter Roberson
le 22 Avr 2019
Modifié(e) : Walter Roberson
le 24 Avr 2019
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 commentaires
Walter Roberson
le 22 Avr 2019
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.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Naming Conventions dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!