You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
On the other hand, I do not understand why jPOS maintains 2 arrays ISOUtil.EBCDIC2ASCII and ISOUtil.ASCII2EBCDIC (exposed as public) when they can be populated at runtime as codes of Charset.forName("IBM1047") (aka EBCDIC)
Some time ago i have checked that this encoding produces exacly same byte codes.
The reason will be displayed to describe this comment to others. Learn more.
As @vsalaman said, legacy reasons, but a PR is Welcome to get that code better (provided is not slower than what we have now, which is pretty fast). Endpoints using EBCDIC happen to be high load legacy institutions and I wouldn't like to slow the code down.
8a12c18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just wondering why, being
s[i]
a bytes[i]&0xFF
isn't the same ass[i]
8a12c18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s[i]
can give you an int that can be negative. The&0xFF
fixes that.8a12c18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the other hand, I do not understand why jPOS maintains 2 arrays
ISOUtil.EBCDIC2ASCII
andISOUtil.ASCII2EBCDIC
(exposed as public) when they can be populated at runtime as codes ofCharset.forName("IBM1047")
(aka EBCDIC)Some time ago i have checked that this encoding produces exacly same byte codes.
8a12c18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
demsey, legacy reasons... That code is from 1999.
8a12c18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @vsalaman said, legacy reasons, but a PR is Welcome to get that code better (provided is not slower than what we have now, which is pretty fast). Endpoints using EBCDIC happen to be high load legacy institutions and I wouldn't like to slow the code down.