UTF8 character set

davelt99

Member
Licensed User
Longtime User
I'm retrieving data from a remote SQL Server database and some of the data is in Spanish.
The data coming out of the server is correct (ex. "buenos días, ¿cómo estás hoy?") but when I look at the value of Response.GetString("UTF8"), all of the Spanish characters (¿, í, á) appear as white question marks insider of a black 4-sided diamond.

Should I be using a different character set?

I tried getting the asc value of the incorrect characters but it comes up as 65533 (???) so I'm not sure what else to try.

Any help would be greatly appreciated.

Thank you,

Dave Tucker
 

Anne

Member
Licensed User
Longtime User
I have the same problem and couldn't solve it reading the ASCII-Characters with Reader.Initialize together with "ISO-8859-1" nor with Getstring. I want to fill the android-Database with Data from MS SQL Version 7, but after reading the first INSERT the Processing stopped.
I also don't get any log.
Thank you in advance for your help
 
Upvote 0

Anne

Member
Licensed User
Longtime User
It was a question about differences between ANSI and Unicode und how to get Unicode from ANSI files. The answer ist very simple. The Standard-Windows-Editor has a possiibilty to save an ANSI to an Unicode File. So I could Insert the data in my SQLite-Database.
Thanks for your help.
 
Upvote 0

h4an

Member
Licensed User
Longtime User
I’m not rely follow this. I have a similar problem. I load a DB table with data from a scv file but the Swedish character converts to question mark. I don’t understand the answer from NJ Dude. Where in the cod shall I put that row?

B4X:
'Add competitors to the database
Dim lstTemp As List
Dim StringDeltag As StringUtils

  lstTemp = StringDeltag.LoadCSV(strDir, strFile, ",")
  Dim Field() As String
  Field = lstTemp.Get(0)
  For i = 1 To lstTemp.Size - 1
    Dim Rad() As String
    Rad = lstTemp.Get(i)
    DB.AddNew(DB.TabDeltagIndex)
    DB.SetField2(DB.TabDeltagIndex, Field(0), Rad(0))
    DB.SetField2(DB.TabDeltagIndex, Field(1), Rad(1))
    DB.SetField2(DB.TabDeltagIndex, Field(2), Rad(2))
    DB.SetField2(DB.TabDeltagIndex, Field(3), Rad(3))
    DB.SetField2(DB.TabDeltagIndex, Field(4), Rad(4))
    DB.Update(DB.TabDeltagIndex)
  Next
 
Last edited:
Upvote 0
Top