# MessageEncoding with UTF-8

**URL:** <https://forum.fixtrading.org/t/messageencoding-with-utf-8/12346>\
**Category:** General Q&A\
**Tags:** international, imported, xid\_164171\
**Created:** [September 7, 2006, 4:11pm UTC](https://forum.fixtrading.org/t/messageencoding-with-utf-8/12346 "2006-09-07T16:11:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fplpo\_x](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@fplpo\_x](https://forum.fixtrading.org/u/fplpo_x)\
**Post date:** [September 7, 2006, 4:11pm UTC](https://forum.fixtrading.org/t/messageencoding-with-utf-8/12346/1 "2006-09-07T16:11:58Z")

</div>

Imported from previous forum

---

<div class="post-metadata">

**Author:** ![fplpo\_x](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@fplpo\_x](https://forum.fixtrading.org/u/fplpo_x)\
**Post date:** [September 7, 2006, 4:11pm UTC](https://forum.fixtrading.org/t/messageencoding-with-utf-8/12346/2 "2006-09-07T16:11:58Z")

</div>

[original email was from Michael Cavén - [michael.caven@sungard.com](mailto: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?

---

<div class="post-metadata">

**Author:** ![fplpo\_x](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@fplpo\_x](https://forum.fixtrading.org/u/fplpo_x)\
**Post date:** [September 7, 2006, 4:42pm UTC](https://forum.fixtrading.org/t/messageencoding-with-utf-8/12346/3 "2006-09-07T16:42:01Z")

</div>

[original email was from Dean Kauffman - [dean.kauffman@tradeweb.com](mailto: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](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?

---

<div class="post-metadata">

**Author:** ![fplpo\_x](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@fplpo\_x](https://forum.fixtrading.org/u/fplpo_x)\
**Post date:** [September 11, 2006, 2:24pm UTC](https://forum.fixtrading.org/t/messageencoding-with-utf-8/12346/4 "2006-09-11T14:24:53Z")

</div>

[original email was from Michael Cavén - [michael.caven@sungard.com](mailto: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](http://fixprotocol.org/documents/1349/FIXFpML%20Proposal.doc)
> 
> Dean

---

<div class="post-metadata">

**Author:** ![fplpo\_x](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@fplpo\_x](https://forum.fixtrading.org/u/fplpo_x)\
**Post date:** [September 11, 2006, 2:43pm UTC](https://forum.fixtrading.org/t/messageencoding-with-utf-8/12346/5 "2006-09-11T14:43:39Z")

</div>

[original email was from Dean Kauffman - [dean.kauffman@tradeweb.com](mailto: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/](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](http://fixprotocol.org/documents/1349/FIXFpML%20Proposal.doc)
> > 
> > Dean

---

<div class="post-metadata">

**Author:** ![fplpo\_x](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@fplpo\_x](https://forum.fixtrading.org/u/fplpo_x)\
**Post date:** [September 11, 2006, 2:54pm UTC](https://forum.fixtrading.org/t/messageencoding-with-utf-8/12346/6 "2006-09-11T14:54:23Z")

</div>

[original email was from Michael Cavén - [michael.caven@sungard.com](mailto: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/](http://8.com/) and follow the links, especially the Wikipedia and Spolsky  
> articles. Dean
