error opening files with Matlab Editor

Matlab starts up, and when requested Matlab's editor starts up without problems. However, when trying to open self-made Matlab scripts and functions, the following error message appears:
Caught "std::exception" Exception message is: locale::facet::_S_create_c_locale name not valid
and the script won't load into the editor.
If I (use another editor to) purposefully edit some erroneous code into the script and let Matlab run it to generate an error message with a link, clicking it will open the script correctly into Matlab's editor.
  • Ubuntu Linux 12.04.2 LTS, accessed by remote login
  • Matlab version R2014a
  • Matlab was installed with sudo in /usr/local, with symbolic links to Matlab's own scripts and function by linking to /usr/local/bin
N.B. This seems to be a problem with the locale , but I don't know what needs to be changed.

4 件のコメント

Dominik
Dominik 2014 年 5 月 28 日
I'm observing same behavior with matlab R2013b and R2014a un a (k)ubuntu 14.04 linux 64 bit. not with matlab R2013a.
Error message: Caught "std::exception" Exception message is: locale::facet::_S_create_c_locale name not valid
appears when opening, writing or reading files.
any suggestions welcome!
Dominik
Dominik 2014 年 5 月 30 日
fixed it by settin /etc/defaults/locale to: LANG=en_GB.UTF-8 LC_CTYPE="en_GB.UTF-8" LC_MESSAGES=en_GB.UTF-8 LC_ALL="en_GB.UTF-8" LC_NUMERIC="en_GB.UTF-8" LC_TIME="en_GB.UTF-8" LC_MONETARY="en_GB.UTF-8" LC_PAPER="en_GB.UTF-8" LC_NAME="en_GB.UTF-8" LC_ADDRESS="en_GB.UTF-8" LC_TELEPHONE="en_GB.UTF-8" LC_MEASUREMENT="en_GB.UTF-8" LC_IDENTIFICATION="en_GB.UTF-8"
and in the bash: . /etc/default/locale
Foivos Michelinakis
Foivos Michelinakis 2015 年 7 月 29 日
I am having the same issue with matlab R2015A and Ubuntu 14.04.2.
I have followed the suggestions found on the Internet by rebuilding locales and modifying the files of /etc/default/locale /etc/environment and $HOME/.pam_environment to be similar to what Dominik proposed.
Any input will be appreciated.
Foivos Michelinakis
Foivos Michelinakis 2015 年 7 月 29 日
In the end, the workaround in this answer did the trick.
After matlab starts run the following command
setenv('LC_ALL','C')
Then you will be able to open .m files.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

質問済み:

2014 年 5 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by