The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: Character encoding in xAP messages




On Wed, 19 Jan 2005 16:20:23 -0000, "Malcolm Green"
<groups@xxxxxxx> wrote:

>I've fixed this problem.  It requires changes to Sender.cs and
Listener.cs
>in xAPTransport:
>
>Sender.cs:
>    // Format the xAP message for the network transport
>    byte[] msg = Encoding.UTF8.GetBytes(message.ToString("N",
null));
>
>Listener.cs
>
>    // Decode the message into a text buffer
>    text = Encoding.UTF8.GetString(socket_info.m_buffer, 0,
bytes_received);
>
>In both cases, Encoding.ASCII was being used instead of UTF8.

Oops!!!!

S
--
Stuart Booth <stuart@xxxxxxx>
xAPFramework.NET - a xAP software development framework for .NET

http://www.xapautomation.org/ 
     http://www.xapframework.net/




xAP_Development Main Index | xAP_Development Thread Index | xAP_Development Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.