MessageEncoding with UTF-8

Imported from previous forum

[ original email was from Michael Cavén - michael.caven@sungard.com ]
I have tried to find out how to encode the fields in the FIX protocol that are to be encoded, for example EncodedText (tag 355). How should the data be serialized in this field when using UTF-8 for example? The FIX documentation does not describe this clearly. Does anybody have a FIX message example of such a message?

[ original email was from Dean Kauffman - dean.kauffman@tradeweb.com ]
Michael,

Encoded fields allow you to to shield data from FIX field parsers - the paired length field tells the parser how many bytes to consume from the encoded field without parsing. For example if the encoded data looks like FIX tags - 10=A^12=B^13=C^ (where ^ is hex 01) you can setup the fields as below and the receiving engine should handle the data without tripping over the reserved characters.

354=15^
355=10=A^12=B^13=C^^
…|…|…|

You might take a look at our document posted elsewhere on the FIX website that describes how to embed an FpML document in the EncodedSecurityDescription field:

http://fixprotocol.org/documents/1349/FIXFpML%20Proposal.doc

Dean

I have tried to find out how to encode the fields in the FIX protocol
that are to be encoded, for example EncodedText (tag 355). How should
the data be serialized in this field when using UTF-8 for example? The
FIX documentation does not describe this clearly. Does anybody have a
FIX message example of such a message?

[ original email was from Michael Cavén - michael.caven@sungard.com ]
I have a FIX News message looking like this:

MessageEncoding (347) = UTF-8
EncodedTextLen (354) = 220
EncodedText (355) = 0xd80xa70xd9…

But I wonder if this is correct? Does the FIX protocol specify a standard to encode for example UTF-8? Is the above example correct?

/Michael

Michael,

Encoded fields allow you to to shield data from FIX field parsers - the
paired length field tells the parser how many bytes to consume from the
encoded field without parsing. For example if the encoded data looks
like FIX tags - 10=A^12=B^13=C^ (where ^ is hex 01) you can setup the
fields as below and the receiving engine should handle the data without
tripping over the reserved characters.

354=15^ 355=10=A^12=B^13=C^^ …|…|…|

You might take a look at our document posted elsewhere on the FIX
website that describes how to embed an FpML document in the
EncodedSecurityDescription field:

http://fixprotocol.org/documents/1349/FIXFpML%20Proposal.doc

Dean

[ original email was from Dean Kauffman - dean.kauffman@tradeweb.com ]
Your data stream is a perfectly acceptable use of EncodedText as long as you’ve published this scheme to your counterparties. However true UTF-8 is encoded quite differently: Take a look at the page http://www.utf-8.com/ and follow the links, especially the Wikipedia and Spolsky articles.
Dean

I have a FIX News message looking like this:

MessageEncoding (347) = UTF-8 EncodedTextLen (354) = 220 EncodedText
(355) = 0xd80xa70xd9…

But I wonder if this is correct? Does the FIX protocol specify a
standard to encode for example UTF-8? Is the above example correct?

/Michael

Michael,

Encoded fields allow you to to shield data from FIX field parsers -
the paired length field tells the parser how many bytes to consume
from the encoded field without parsing. For example if the encoded
data looks like FIX tags - 10=A^12=B^13=C^ (where ^ is hex 01) you can
setup the fields as below and the receiving engine should handle the
data without tripping over the reserved characters.

354=15^ 355=10=A^12=B^13=C^^ …|…|…|

You might take a look at our document posted elsewhere on the FIX
website that describes how to embed an FpML document in the
EncodedSecurityDescription field:

http://fixprotocol.org/documents/1349/FIXFpML%20Proposal.doc

Dean

[ original email was from Michael Cavén - michael.caven@sungard.com ]
Ok, thanks!

/Michael

Your data stream is a perfectly acceptable use of EncodedText as long as
you’ve published this scheme to your counterparties. However true UTF-8
is encoded quite differently: Take a look at the page http://www.utf-
8.com/ and follow the links, especially the Wikipedia and Spolsky
articles. Dean