ASCII Interpreter vs. Literal Interpreter - real differences?

39 views
Skip to first unread message

DL Birch

unread,
Oct 18, 2014, 1:40:53 PM10/18/14
to jpos-...@googlegroups.com
Hi, Just wondering what the real difference is between the Ascii Interpreter and the Literal Interpreter since both seem to force an ASCII encoding?  Best, Doug

Alejandro Revilla

unread,
Oct 18, 2014, 3:05:02 PM10/18/14
to jPOS Users
Good question Dough and I don't have a good answer.

I don't remember the order in which we added this classes, but looking at the code, I think we might have some problems with the AsciiInterpreter in some locales and added the LiteralInterpreter, keeping the former for backward compatibility.

If you look at the implementation, AsciiInterpreter.interpret uses the String.length() while LiteralInterpreter uses the produced bytes length. They are the same with 8 bits characters, but spells trouble with unicode.

There's a problem with most ISO85838 interchanges, the rarely define the character encoding, so you get systems getting messages from different terminals using different encoding, and field 43 and 45 for example becomes nightmares.




On Sat, Oct 18, 2014 at 3:40 PM, DL Birch <dugc...@gmail.com> wrote:
Hi, Just wondering what the real difference is between the Ascii Interpreter and the Literal Interpreter since both seem to force an ASCII encoding?  Best, Doug

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
 
Join us in IRC at http://webchat.freenode.net/?channels=jpos
 
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/768f8249-a2fe-4570-8a02-8621cbd9cfd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

DL Birch

unread,
Nov 4, 2014, 10:29:22 AM11/4/14
to jpos-...@googlegroups.com
Thank you Alejandro for clarifying and for the comment on the lack of character encoding ... 
Reply all
Reply to author
Forward
0 new messages