B4J Question Problem with accented characters [ é, á , ó , others ] SOLVED

Waldemar Lima

Well-Known Member
Licensed User
Longtime User
I made a simple translation file, and I'm reading it by injecting it into a map, but when I put accented characters, this happens:

The word should be: " Inventário " , but I get: " InventÃ;rio "
1606184489610.png


is in the translation file: " menu02=Inventário "

excerpt used for reading the translation:

B4X:
   If (File.Exists(File.DirApp,"data/language/"&Language.Trim&".lang")) Then
        Language = File.ReadMap(File.DirApp,"data/language/"&Language.trim&".lang")
    End If

Sub Traduzir(translate As String) As String
    
    Dim tmpTranslate As String = Language.Get(translate)
    Dim b() As Byte = tmpTranslate.GetBytes("UTF-8")
    
    Return BytesToString( b, 0, b.Length, "UTF-8" )
    
End Sub
 

OliverA

Expert
Licensed User
Longtime User
Upvote 0
Top