Android Question Load Text File For Label with - Encoding - Solved


B4X:
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("Layout1")
    Label1.Text = File.ReadString(File.DirAssets,"N.txt")
    Label1.Text.GetBytes("UTF8")
End Sub
My text is in Persian but it doesn't work properly. What should I do?
 
Last edited:
Code is wrong.
This line doesn't do anything: Label1.Text.GetBytes("UTF8")

There are two options:
1. The file is not encoded in UTF8.
2. The default font doesn't support the Persian letters.

I guess that the encoding is wrong.
How I can Change encoding?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…