Which version can support the naming of m files in Chinese and the use of space naming?

2 visualizaciones (últimos 30 días)
excuse me,Which version can support the naming of m files in Chinese and the use of space naming?
thanks a lot!!!

Respuesta aceptada

Walter Roberson
Walter Roberson el 22 de Abr. de 2019
Editada: Walter Roberson el 24 de Abr. de 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 comentarios
Walter Roberson
Walter Roberson el 22 de Abr. de 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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Naming Conventions en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2014a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by