*
* By default, MinLowerLayerProtocol uses the "US-ASCII" character set, which is not likely
* what you are looking for if you want to process accents or characters that don't
* appear in the English alphabet.
*/
SimpleServer s = new SimpleServer(123, new MinLowerLayerProtocol(), new PipeParser());
/*
* Using MinLowerLayerProtocol, it is possible to set the use of a specific character set
* by using a system property. For example, if you wanted to receive Central and Eastern
* European characters, you probably need the ISO-8859-2 charset. Setting the following
* system property before using MinLowerLayerProtocol tells the LLP that incoming
* messages should be received using this encoding. Note that you can not change this
* value after a connection is established.
*/
System.setProperty(MinLLPReader.CHARSET_KEY, "ISO-8859-2");
s = new SimpleServer(123, new MinLowerLayerProtocol(), new PipeParser());
/*
* If the systems sending you messages are correctly
* populating MSH-18, as in the following message which specified "8859/1", or
* ISO-8859-1 encoding, you have another option.