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




------=_NextPart_000_0027_01C4FE78.4D246D20
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit

Oh cool - you fixed an old bug in my Extreamer client that'd I'd never had
the time to track down!

To formalise this - the xAP specification says ASCII everywhere. Was this
done for a specific reason or were the specification definers just being a
bit loose here? Maybe the spec should be revised to say UTF8.

Right, I'm off to listen to some German techno with umlauts in the title
and
other diacritically challenged corners of my music collection...

_____

From: Malcolm Green [mailto:groups@xxxxxxx]
Sent: 19 January 2005 16:20
To: xAP_developer@xxxxxxx
Subject: RE: [xAP_developer] Character encoding in xAP messages


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.