UTF-8 and iso-8859

Nizze

Active Member
Licensed User
Longtime User
Hi i also have that problem but with swedish letters.

i have this code that works for all letters but not for "åäö and ÅÄÖ".

barray = conv.StringToBytes(Txtut.Text,"UTF-8")
DataToSend = conv.HexFromBytes (barray)

How can i make it work ??

// Dind not noticed that it was in the wrong place... Made a new one in a new topic.... //

Br
Nizze
 
Last edited:

Nizze

Active Member
Licensed User
Longtime User
Maybe whatever you are sending the data to does not understand UTF-8. If so you need to know what codepage to convert the string to.

Hi

The data i'm sending is from a textbox and if use ÅÄÖ it will not work .
And the other side is a hardware ( BT serial port ) that goes direct to a device .
So i thought that there might be a way to convert it direct to another "codepage".
The letter Å will be "3CA5" ( might remember wrong ) and if should be 8F chr(143)

// Nizze
 
Last edited:
Upvote 0

agraham

Expert
Licensed User
Longtime User
So i thought that there might be a way to convert it direct to another "codepage".
There is
B4X:
barray = conv.StringToBytes(Txtut.Text,"ISO-8859-1")

The letter Å will be "3CA5" ( might remember wrong ) and if should be 8F chr(143)
In what codepage is Å = 0x8c? In ISO-8859-1 and Windows-1252 it is 0xc5. You can get a list of supported codepages with conv.SupportedEncodings.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…