tags:

views:

79

answers:

2

I am using w3c dom object that represnet an XML file to create the jPOS ISOMessage object. (loop over the dom object ans set ISOMessage Fields)

The Question is: In the resulting ISOMessage Object, How to allow one ISOField to contain Control character?

Note: I am using a Custom Packager that reads the format of the ISOMessage from xml file with such contents:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE isopackager SYSTEM "genericpackager.dtd">

<isopackager>
  <isofield
      id="0"
      length="4"
      name="MESSAGE TYPE INDICATOR"
      pad="true"
      class="org.jpos.iso.IFE_NUMERIC"/>
  <isofield
      id="1"
      length="16"
 name="BIT MAP"
      class="org.jpos.iso.IFB_BITMAP"/>
  <isofield
     id="2"
      length="19"
      name="PAN - PRIMARY ACCOUNT NUMBER"
      pad="false"
      class="org.jpos.iso.IFE_LLNUM"/>
      ..............
      .................
      ...................
A: 

You're encoding in UTF-8, so you can just encode the Unicode control characters like any character. But something tells me you mean something else.

Welbog
A: 

You can also change your fieldpackager to a BINARY type (see IF*BINARY) and use an hex representation, i.e.:

<field id="xx" value="0123456789ABCDEF" type="binary" />
apr