What has changed between 2020r21 and 2021r1 for webpage.show?

Yeah it’s the structure. Structure elements, even if they are strings, don’t have encoding information associated with them.

I suggest you make an extension method for ensuring the encoding of a string that looks something like this:

Public Function ToUTF8(extends s as string) As String
  If s.Encoding = Nil Then
    Return s.DefineEncoding(Encodings.UTF8)
  End If
  
  If s.Encoding = encodings.UTF8 Then
    Return s
  End If
  
  Return s.ConvertEncoding(encodings.UTF8)
End Function

and then add that in each place where you are pulling data from that structure… like this:

badge.Add lv.badge.ToUTF8
badgeIndicator.Add lv.badgeIndicator.ToUTF8
caption.Add lv.caption.ToUTF8
fontawesomeiconname.Add lv.fontawesome.ToUTF8

Making those four changes makes your control work again (and will work in older versions as well)

1 Like