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


  • Subject: RE: Character encoding in xAP messages
  • From: "Malcolm Green" <groups@xxxxxxxxxxxx>
  • Date: Wed, 19 Jan 2005 16:20:23 -0000


------=_NextPart_000_0113_01C4FE42.C7415220
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

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.


Malcolm Green

_____

From: Edward Pearson [mailto:edward.mailgroup@xxxxxxx]
Sent: 18 January 2005 19:51
To: xAP_developer@xxxxxxx
Subject: RE: [xAP_developer] Character encoding in xAP messages


Are you using some particular framework code, eg xAPFramework?

_____

From: Patrick Lidstone (Personal E-mail) [mailto:patrick@xxxxxxx]
Sent: 18 January 2005 19:21
To: xAP_developer@xxxxxxx
Subject: RE: [xAP_developer] Character encoding in xAP messages


> In implementing further xAP features in TelCanto, I've
> discovered that strings with accented characters (e.g. within
> artist, album and title
> fields) are not being transmitted correctly.  I'm just
> passing .NET String values and assumed they would be
> transmitted using UTF-8 encoding.  Is there something else I
> need to do to pass such strings correctly?

They should be, at least according to the spec, I think.

Patrick



_____


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.