Why are some extended ASCII characters not retained after closing and reopening an M file in releases prior to MATLAB R2022a?
17 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2015 年 4 月 3 日
コメント済み: Walter Roberson
2025 年 10 月 10 日 21:26
I am using MATLAB R2014b. When I create an M file that contains the line "a = 'δ'" and execute it, it runs normally. However, when I close the M file and reopen it, the line reads "a = '?'" in the code editor. Running the script assigns the question mark character to the variable "a".
Why doesn't MATLAB preserve alternate characters like delta in the editor?
採用された回答
MathWorks Support Team
2025 年 9 月 26 日 0:00
編集済み: MathWorks Support Team
2025 年 10 月 10 日 17:43
As of MATLAB R2022a, MATLAB fully supports UTF-8 encoding and can support characters such as delta as desired. For more information, please see the MATLAB R2022a Release Notes. Changes to fully support Unicode characters can be seen starting in R2020a, with the support completed with the release of R2022a.
Since you are using MATLAB R2014b, the described behavior is expected because the UTF-8 delta character is not properly saved. To resolve this issue, you can upgrade to a more recent version of MATLAB such as MATLAB R2022a or newer.
1 件のコメント
Walter Roberson
2025 年 10 月 10 日 21:26
The exact version for UTF-8 support depends on which operating system you are using, and on whether you are using the English interface or one of the Asian language interfaces. If I recall correctly, limited support started before R2020a.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Programming Utilities についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!