Nizze Active Member Licensed User Longtime User Mar 14, 2016 #1 Hi Maybe i'm stup...... But i can't find my problem with Swedish letters. I know this from before but i cant find the solution If i send from a textbox "ÅÄÖ" B4X: Expand Collapse Copy Dim buffer() As Byte buffer = DataToSend.GetBytes("ISO-8859-1") Astream.Write(buffer) In my pc i will have the value 229, 228, 246 . And they are translated into ??? And when i send the same letters between 2 androids i will get "???" insted of "ÅÄÖ" If i set a breakpoint on this line i can see that the "ÅÄÖ" will have the Value 63, 63, 63 B4X: Expand Collapse Copy Sub Astream_NewData (Buffer() As Byte) Msg = Conv.StringFromBytes(Buffer,"ISO-8859-1") What is it that i dont do in the right way ??
Hi Maybe i'm stup...... But i can't find my problem with Swedish letters. I know this from before but i cant find the solution If i send from a textbox "ÅÄÖ" B4X: Expand Collapse Copy Dim buffer() As Byte buffer = DataToSend.GetBytes("ISO-8859-1") Astream.Write(buffer) In my pc i will have the value 229, 228, 246 . And they are translated into ??? And when i send the same letters between 2 androids i will get "???" insted of "ÅÄÖ" If i set a breakpoint on this line i can see that the "ÅÄÖ" will have the Value 63, 63, 63 B4X: Expand Collapse Copy Sub Astream_NewData (Buffer() As Byte) Msg = Conv.StringFromBytes(Buffer,"ISO-8859-1") What is it that i dont do in the right way ??
Erel B4X founder Staff member Licensed User Longtime User Mar 14, 2016 #2 Are you using B4J on the PC? Are you using AsyncStreams in prefix mode? Upvote 0
Nizze Active Member Licensed User Longtime User Mar 14, 2016 #3 Erel said: Are you using B4J on the PC? Are you using AsyncStreams in prefix mode? Click to expand... Hi Erel Yes i'm using AsyncStreams . But not Prefix mode . B4X: Expand Collapse Copy Astream.Initialize(In, out, "astream") And im using dotNet on pc Upvote 0
Erel said: Are you using B4J on the PC? Are you using AsyncStreams in prefix mode? Click to expand... Hi Erel Yes i'm using AsyncStreams . But not Prefix mode . B4X: Expand Collapse Copy Astream.Initialize(In, out, "astream") And im using dotNet on pc
Erel B4X founder Staff member Licensed User Longtime User Mar 15, 2016 #4 Your B4A code is correct. The problem is somewhere else. I recommend you to create a simple B4J program as the server to test it. Upvote 0
Your B4A code is correct. The problem is somewhere else. I recommend you to create a simple B4J program as the server to test it.
mc73 Well-Known Member Licensed User Longtime User Mar 15, 2016 #5 Perhaps it won't help, but tried utf-8 instead of iso-8859-1? Upvote 0
Nizze Active Member Licensed User Longtime User Mar 15, 2016 #6 mc73 said: Perhaps it won't help, but tried utf-8 instead of iso-8859-1? Click to expand... Hi That worked !! I rewrote my project ( Both Pc and B4A to UTF8 ) and then it works !! So now my new project has taken a big step forward .. Thanks for helping out !! Br Nisse Last edited: Mar 15, 2016 Upvote 0
mc73 said: Perhaps it won't help, but tried utf-8 instead of iso-8859-1? Click to expand... Hi That worked !! I rewrote my project ( Both Pc and B4A to UTF8 ) and then it works !! So now my new project has taken a big step forward .. Thanks for helping out !! Br Nisse