|
Bruce, Back on the topic, I created the file as Open data type fields (instead of UTF8) since this way, I can put any ccsid in the field, and read the field into java as select vargraphic(field,<len+>,13488) from myfile. I do a str=rs.getString() on the field and can see in my Java debug as Chinese Unicode field. I then write to a pdf file using a write(str.getByte()) to an output stream file (myfile.pdf). When I open my pdf, I don't see any Chinese but only junk value. Would you know where I am loosing the conversion? Is it in pdf? Is it in getbytes()? TIA, Sudha Sudha Ramanujan SunGard Futures Systems sramanujan@xxxxxxxxxxxxxxxxxx (312) 577 6179 (312) 577 6101 - Fax -----Original Message----- From: Bruce Vining [mailto:bvining@xxxxxxxxxx] Sent: Thursday, March 31, 2005 11:54 AM To: Midrange Systems Technical Discussion Subject: RE: Unicode CREATE TABLE UTF8 (KEYFIELD CHARACTER(5) NOT NULL WITH DEFAULT, DATA CHARACTER(100) CCSID(1208) NOT NULL WITH DEFAULT) Data stored in DATA will be UTF8 and not EBCDIC, but if your job CCSID is not 65535 the UTF8 data will be converted to/from EBCDIC as mentioned in my earlier note. You can read/write this data from applications written in RPG (or other languages), utilities such as DFU, and the like as character data. I would suggest simply creating the file and writing some simple RPG programs to load/access the data. Especially notice the change in behavior when your job CCSID is or is not 65535 and you run the sample applications. Bruce Vining <SRamanujan@sunga rdfutures.com> Sent by: To midrange-l-bounce <midrange-l@xxxxxxxxxxxx> s@xxxxxxxxxxxx cc Subject 03/31/2005 11:36 RE: Unicode AM Please respond to Midrange Systems Technical Discussion Thanks Bruce. Can this be created in DDL also? How will my Create/Alter table look like? Can I store char as well as Unicode in these fields? Can I read the FIELD in your example into a RPG code? How do I define the field in RPG to store them incase I do? Do I need to do anything different while reading these fields into a Java program or a plain sql? Any limitations or things I need to be aware of about these declarations? I am just trying to understand what I can do or not do with these fields and hence the bombardment of questions. Regards, Sudha Sudha Ramanujan SunGard Futures Systems sramanujan@xxxxxxxxxxxxxxxxxx (312) 577 6179 (312) 577 6101 - Fax -----Original Message----- From: Bruce Vining [mailto:bvining@xxxxxxxxxx] Sent: Thursday, March 31, 2005 10:55 AM To: Midrange Systems Technical Discussion Subject: Re: Unicode Character fields can be defined as being UTF-8 starting with V5R3. Here is some sample DDS for that: R RECORD KEYFIELD 5 FIELD 100 CCSID(1208 *NORMALIZE) K KEYFIELD When working with UTF8 fields you need to be aware of your job CCSID. If 65535 your application will read/write using UTF8 encoding directly. If not 65535 then database will convert the UTF8 to/from your job CCSID on read/write operations. Bruce Vining <SRamanujan@sunga rdfutures.com> Sent by: To midrange-l-bounce <midrange-l@xxxxxxxxxxxx> s@xxxxxxxxxxxx cc Subject 03/31/2005 10:01 Unicode AM Please respond to Midrange Systems Technical Discussion Hi All, Is there a way to create a Unicode field in the table on iSeries? I know a Graphic/VarGraphic with CCSID 1200 is Unicode but can I create one as Char/Varchar with CCSID to make it Unicode as well? Thanks, Sudha Sudha Ramanujan SunGard Futures Systems sramanujan@xxxxxxxxxxxxxxxxxx (312) 577 6179 (312) 577 6101 - Fax -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
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.