From: Nico V. <ni...@sk...> - 2005-07-22 17:32:59
|
Hi Bernhard, Encoding (eg ISO-8859-1) only comes into the picture when you read/write=20 from/to a file or a socket. There was in a bug in hapi pre 0.4.3 with regards to encoding in the MLLP=20 classes, so if you're receiving the data from SAP over a socket upgrading=20 to 0.4.3 should solve your problem. If you're reading the data from a file, please make sure to set the right=20 encoding on your stream constructor ! If you can't figure out, please send me a sample message and the piece of=20 code you use to parse the message. Best Regards Nico At 19/07/2005, B=F6hm Bernhard wrote: >Hi all, > >I am using the HAPI (0.4.2) classes to transform patients that have been=20 >exported from SAP, for mass loads (~ 1.000.000 persons), to a standard=20 >HL7-A08 message. >The problem I have now, is a simple one, but I did not find a solution! We= =20 >have, in our SAP system, sometimes strange characters stored, for example= =20 >a =91#=92 in an address field. Now, to be able to parse the HL7 message,=20 >generated by HAPI, in our subsystem, I would need to encode the message in= =20 >ISO-8859-1 encoding format (for those special characters). In the=20 >PipeParser-class, which I use to encode, I found a method =93encode(Message= ,=20 >String)=94 which should use a special encoding to generate the message.= But,=20 >unfortunately ISO-8859-1 seems not to be supported, as I always get an=20 >EncodingNotSupportedError! >So, my question would be, if there is a possibility to encode in=20 >ISO-8859-1 or maybe there is another method that I did not find yet?! > >Thanks a lot in advance for your help! > >Regards >Bernhard B=F6hm > |