Does anyone else think this is a bug?
https://tracker.xojo.com/xojoinc/xojo/-/issues/77262
In the following code:
dim NBSPAsBytes As String
NBSPAsBytes=ChrB(&hE2) + ChrB(&H80) + ChrB(&HAF)
dim UTF8NBSP as string
UTF8NBSP=DefineEncoding(ChrB(&hE2) + ChrB(&H80) + ChrB(&HAF), encodings.UTF8)
UTF8NBSP=UTF8NBSP.ReplaceAll(NBSPAsBytes, "@")
…the properly encoded UTF-8 non-breaking space character is replaced with the “@” character when searching for the non-breaking space character as bytes. The character-as-bytes string has a Nil encoding.