× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Yes, I've read many warnings about how CCSID 65535 is most likely not what
you want to use. Unfortunately this is out of my control and if the CCSID
does turn out to be the problem this issue might be unsolvable. The company
that is using our application has their system CCSID set to 65535 and
changing it could potentially cause issues with other setups that they have.
I know it is possible to change the CCSID to something other than the system
default and has been one thing I've been looking into. At this point though
I'm unsure where the conversion is going wrong and I'm just guessing that
the issue is the CCSID. So I'm thinking my biggest concern should be
figuring out when this data is processed into an incorrect order. At some
point between getting the data from the spooled file and it being sent to
the Java program something is handling it incorrectly.

Thanks,
Geren

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Dan Kimmel
Sent: Monday, July 01, 2013 11:43 AM
To: Java Programming on and around the IBM i
Subject: RE: Sending Hebrew data from RPG program to Java program

By the way, using system CCSID 65535 is dangerous. It forces the system to
assume all the data it is handling is in the same character set. The system
must assume some CCSID when converting to Unicode. In the US, this is
typically CCSID 37. Other countries have different defaults depending on the
language system value. It may simply be that your system is assuming a CCSID
with a BidiStringType different than what's actually in the data. See:

http://javadoc.midrange.com/jtopen/com/ibm/as400/access/BidiStringType.html

According to this, there are bidi flags embedded in the data and the bidi
flags vary according to the CCSID.

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Geren White
Sent: Friday, June 28, 2013 3:58 PM
To: java400-l@xxxxxxxxxxxx
Subject: Sending Hebrew data from RPG program to Java program

Hello All,

I'm having some issues with handling Hebrew data that I was hoping some
of you might be able to help me out on. I'm trying to send Hebrew data from
an RPG program to a Java program which the Java program then takes and
constructs a PDF. I'm having a few issues with processing the Hebrew data
to get it into a correct display order. I'm the Java programmer on this
project so please excuse any iSeries/RPG ignorance.

So first off the RPG program sends a string of data to the Java program
that is a mix of Hebrew/English/numerical data. The data comes from a
spooled file on the iSeries and is actually each line of the file. There is
no processing of the data on the iSeries side and it is sent as is. The
Java program is receiving most of the data as I would expect in a logical
order. Logical order being the order in which the characters were typed.
I've used the Java Bidi class to process the data and I've tried the
AS400BidiTransform class. Both of these classes can handle most of the data
correctly and get it into a correct display order. The issue is that there
are certain strings of data that are received in an unexpected order.



This is best explained through examples so assume capital H's are Hebrew:



An example of a situation that can be handled by the Java Bidi class or
AS400BidiTransform:

First the correct display order:

english :HHHH

I would receive this string as:

HHHH: english

The first H in the received string would be the right most H in the display
order. As you can see this would be a logical order for bidirectional data
as the user would type the Hebrew and then switch to LTR with the english
portion. There are much more complex situations that are handled correctly
by the Bidi classes as well but this is just a simple example.



Now an example of an incorrect ordering:

Correct display order:

350 X 250 X 150 :HHHH

Received order:

HHHH: 150 350 X 250 X



This data does not seem to be in a logical order. The first number after
the Hebrew, 150 in this case, seems to stay within the RTL segment while the
rest of the equation gets put into a LTR segment. The Java Bidi class and
the AS400BidiTransform class do not process this correctly. There are many
more situations where this happens and way too many to have special cases
for.



I've been reading all about bidirectional data processing and iSeries
support for it and can't seem to figure this out. I'm thinking it might be
an issue with the CCSID on the iSeries. The system's CCSID is 65535 and all
our jobs should be the same. So from my understanding there shouldn't be
any conversion on the iSeries side but somewhere along the line this data is
getting jumbled.


If any of you have any experience with this or any ideas they would be much
appreciated. Let me know if you need more information. Thank you for your
time.



Regards,

Geren White

CYBRA Corporation



--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing
list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/java400-l.



--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing
list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/java400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.