MATLAB 源文件中的 Unicode 字符 [英] Unicode characters in MATLAB source files

查看:35
本文介绍了MATLAB 源文件中的 Unicode 字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 MATLAB 源文件.当我写文本时,这似乎有效;但是,如果我关闭文件并重新加载它,不寻常"的字符就会变成问号.我猜 MATLAB 正在将文件保存为 ASCII.

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" characters have been turned into question marks. I guess MATLAB is saving the file as ASCII.

有什么方法可以告诉 MATLAB 改用 UTF-8 吗?

Is there any way to tell MATLAB to use UTF-8 instead?

推荐答案

MATLAB 进程如何使用区域设置 展示了如何为不同平台设置编码.使用

How the MATLAB Process Uses Locale Settings shows how to set the encoding for different platforms. Use

feature('DefaultCharacterSet')

您可以在此处阅读有关此未记录函数的更多信息.另请参阅此 用于其他选项的 Matlab 中央线程.

You can read more about this undocumented function here. See also this Matlab Central thread for other options.

这篇关于MATLAB 源文件中的 Unicode 字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆