mdf() function with German Umlaut ä,ö,ü or other special characters

Hi,
I have been using the mdf() function for quite a while now for GUI tools to convert mdf files etc.
Somewhere between Matlab 2018b and 2019b the mdf() function lost its ability to interpret German umlauts within the input string. I get the error message:
"Can't create a std::string from this data"
For example, this error appears when I try to read a file called "äb.mf4". It was still possible on Matlab 2017b and 2018b.
Any way to deal whith this? I cannot use strrep or other functions as I cannot change the names of my input file names or paths accordingly.
Thanks!

4 Comments

Hi,
same problem here. As soon as there is special characters in the file name (e.g. "°" in °C) this error occures.
A colleague of mine used 2019a and was additionally able to import channel names with a § sign in it.
With version 2019b this ain't possible anymore. Seems like a throwback to me.
The only workaround is to import the given data in CANape and remove the error rising channel which is not very practicable with a huge amount of files.
I'd really appriciate a official statement.
Thanks in advance!
Hi,
any news or statements on this issue? It would be very welcome. After some waiting, I wrote a workaround today:
Before calling mdf(), I check for sepcial characters in the file's path or name and load a copy of the file with a dummy name in mdf(). The only drawback (apart from additional code) is that I can't delete this dummy file somehow from the Matlab working directory with delete() from my script as it seems to be blocked by a process. Maybe this is because of my poor programming skills or because mdf() doesn't close the file handle properly...
Thanks!
Hi,
my friend. Try to make sure, that in ur Path, there is not ''incompatibe" Alphabet, for example, ü,ä or other language. This Error will automatic solved, when I use the Path only in English
2018a可以用中文做文件名,但是2020a和2020b在matlab m文件和命令行就不能用中文名了,否则会报出Can't create a std::string from this data.的故障,这非常的奇怪。mlapp文件中 代码使用mdf()函数,也不可以用中文名的

Sign in to comment.

Answers (1)

Vehicle Network Toolbox R2021a contains improved support of international characters for the MDF functions. Please upgrade to R2021a and error should be resolved.

Categories

Find more on Vehicle Dynamics and Scenarios in Help Center and File Exchange

Asked:

on 17 Mar 2020

Answered:

on 18 Nov 2021

Community Treasure Hunt

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

Start Hunting!