MBS Bug in TagNamesMBS

I think you ask about the thread FolderItem.TagNamesMBS strips out EndOfLines thread.

So I tried it here:

Var f As FolderItem=SpecialFolder.Desktop.Child("test.txt")
Dim b As BinaryStream = BinaryStream.Create(f, True)
b.Close

Var BeforeTags() As String=f.TagNamesMBS
Dim BeforeFinderLabel As Integer = f.FinderLabelMBS

Var status As Integer=f.SetTagNamesMBS(Array("Test"+Encodings.UTF8.Chr(10)+"3"))
Var AfterTags() As String=f.TagNamesMBS
Dim AfterFinderLabel As Integer = f.FinderLabelMBS

Break

and in debugger I see:

Everything seems to work as documented. The label is set, the color shows in Finder (violet here). When we query it, we get back “test” as tag name and 3 as finder label color.
The trick to pass in the text with Chr(10) and number is not documented in Apple documentation. and you can’t expect reading TagNamesMBS to return you that number.