Preset names with national characters have random characters at the end

Plugin program names with national characters in them tend to get extra characters appended to the end. The extra characters change now and then when I shut down and start Cantabile again.

The names I have entered into the presets in the screenshot are

  • Røde NTH-MIC denoiser
  • Røde Procaster denoiser
  • Røde NTH-100
  • Räksmörgås

Performer 4.0 4191 x64
Preset Mode: Entire Preset Snaphots

c4files.zip (289.4 KB)

You are using the English version of Cantabile, with not translated strings. I think you better ask Brad.

Yes, I am using an untranslated version, but I don’t think it has anything to do with that.

The extra characters only show up in program names I have entered myself and only after I have restarted Cantabile.
edit_program_name

Comments with national characters in them don’t show this behaviour.

I’ve noticed that at least the comment strings are encoded in UTF-8, i.e. our national characters take up two bytes.

@brad Maybe I’m looking at null-terminated strings that get their terminating null overwritten because some characters in the string are two bytes?

A couple more data points:
It happens with all plugins I have tested.
Different instances of the same plugin get different data added to their program names.

Edit:
A new symptom I just discovered. This particular program cannot be exported.

Choosing Export Program… does nothing, the “Save As” dialogue doesn’t show up. If I remove the very last character in the program name, it does export.

Hi @Ragnar, I am not @brad but this seems a very good explanation. Maybe it is related to this

I seem to remember that Cantabile is written in C++…not 100% sure, though.

Gabriel

AFAIK, Cantabile is mostly written in C#, and I very much assume that @brad is using Unicode character encoding, which works nicely with nordic and other characters.

I just did some testing with an instrument plugin with german umlauts and also the scandinavian ø, and it worked without any issues using the Entire Snapshots mode. Saving the song, closing Cantabile, re-starting and re-opening multiple times didn’t change the preset names. Also exporting wasn’t a problem. Errors came later - see next post

image

Not sure what is different in your setup? What language is your Windows system set to?

I looked at your song files, but the appended asian characters are baked in there, so not a lot to be learned here.

Cheers,

Torsten

Update: a few loads and saves later: my preset names are starting to get corrupted as well - looks like there is a bug in Cantabile’s preset handling.

Cantabile stores plugin presets in a big raw data block called “pluginData” in its song files - no way I can learn anything from that; that’s @brad’s territory

It looks like this “pluginData” encoding doesn’t handle Unicode characters well - for the moment, we should keep things to standard English characters to be safe.

Cheers,

Torsten

Thanks for reporting… I’ll look into it.

fwiw: although Cantabile mostly handles strings in C# so should just work, for preset names as @Torsten mentioned, they’re handled in the C++ code and written as binary blobs so that’s probably where the issue is.

Brad

1 Like

Found it… fixed for next build.

1 Like

Excellent!

Thank you @Torsten , for testing!