Imported from previous forum
My FIX Engine receives a FIX Tag=Value^ message (actual message contains delimiter, shown as ^ below for readability) which looks like :-
8=FIX.4.0^9=112^35=0^49=FIX-TRADING-COMMUNITY^56=MAHESH^34=234^52=20150214-22:23:24^112=VALOMESS^10=123^
I have opened a socket and DataInputStream as follows :-
Socket socket = new Socket(“mydomain.xyz”, 1000);
DataInputStream dis = new DataInputStream(socket.getInputStream());
When the above message is arriving in my Java application, I am reading the message using
int count = dis.available();
byte[] byteBuffer = new byte[count];
dis.read(byteBuffer);
//Logic to extract FIX message(s) from byteBuffer and
//pass them onto message handling Thread(s)
Am I right in assuming that each of 8, =, F, I, X, ., 4, ., 0, SOH, 9, =, … etc. are all ASCII (7 bit encoding) except for encrypted / raw data / encoded text. This is also based on the statement about CheckSum (Tag 10) “Three byte, simple checksum … Always defined as three characters.” Should I use Java byte (an 8-bit signed two’s complement integer. It has a minimum value of -128 and a maximum value of 127 (inclusive)) or char (a single 16-bit Unicode character. It has a minimum value of ‘\u0000’ (or 0) and a maximum value of ‘\uffff’ (or 65,535 inclusive)). In the WWW URLs, now Unicode is permitted and its called Internationalized resource identifier http://en.wikipedia.org/wiki/Internationalized_resource_identifier . Encoding of FIX Tag value messages - is it always ASCII or any new proposals are present to make the full message encoded in non ASCII representation(s) like EBCIDIC / Unicode?
You are correct that in tag=value encoding, all but special encoded text fields use ASCII character set, also known as USASCII. Character values in string fields are in the range decimal 32-127. There is no plan to change tag=value encoding, but FIX binary encodings, such as SBE, GPB and ASN.1, may offer alternative character encodings.