FolderItem.TagNamesMBS strips out EndOfLines

Hi,

To add MacOS tags to an existing file, the colour must be passed in a second line, like this:

Var f As FolderItem=SomeFile
Var i As Integer=f.SetTagNamesMBS(Array("Test"+Encodings.UTF8.chr(10)+"3"))

So far, so good. The file has a purple tag named “Test".
But I’ve found it’s not possible to get it back. Try this:

Var f As FolderItem=SomeFile
Var i As Integer=f.SetTagNamesMBS(Array("Test"+Encodings.UTF8.chr(10)+"3"))
Var t() As String=f.TagNamesMBS

First, the tag is correctly set, with the colour, after the 2nd line. Then, “t” contains just one item: “Test”. Notice the chr(10) and “3” are gone.
This actually breaks my app. Could this be fixed, please?

Isn’t this old functionality? I thought I had done something with Finder tags a while ago. But right now I can’t find it.

Well, we did also have FinderLabelMBS to set the color label.
Otherwise we just pass through the strings as you provide them.

We had a discussion about this subject, on this forum, some weeks/months ago. My question was about setting several custom tags to a given file, each having a different colour (from the set of colours provided for labels: 0 to 7). Perhaps you remember, Christian, as you were in the discussion.
After several attempts, the only provided answer was to use “Tag name”+chr(10)+IndexOfColour. If you have a better idea today, I’d be happy to hear it.
Setting the Finde label just changes a single colour (the file’s colour), but won’t work for one colour per tag.

Anyway, I’m describing a bug: the retrieved tags from FolderItem.TagNamesMBS removes the chr(10) and the following string, which is fairly working when setting it.
Thanks for your answers.