08-30-2022, 04:49 PM
I haven't had a chance to try it but I think these functions will assist us with the issue of the texture loading. I'll give it a try later if I have time.
Code: (Select All)
Function AsciiToUtf8byte$ (c As _Unsigned _Byte)
Dim As String * 2 outch2
Dim As String * 3 outch3
If c < 128 Then
Mid$(outch2, 1, 1) = Chr$(c)
Mid$(outch2, 2, 1) = Chr$(0)
AsciiToUtf8byte = outch2
Else
Mid$(outch3, 2, 1) = Chr$(_SHR(c, 6) Or &HC0)
Mid$(outch3, 1, 1) = Chr$((c And &H3F) Or &H80)
Mid$(outch3, 3, 1) = Chr$(0)
AsciiToUtf8byte = outch3
End If
End Function
Function AsciiToUtf8$ (instring As String)
Dim As Long i
Dim As String outstring
For i = 1 To Len(instring)
outstring = outstring + AsciiToUtf8byte(Asc(instring, i))
Next
AsciiToUtf8 = outstring
End Function
Ask me about Windows API and maybe some Linux stuff