Ok I see what you are saying. That makes sense now, I can run a .decode('cp500') on the items in question and get what I am after.
Thank you very much!
From: OpenSource [mailto:opensource-bounces@xxxxxxxxxxxx] On Behalf Of John Yeung
Sent: Tuesday, December 19, 2017 4:47 PM
To: IBMi Open Source Roundtable <opensource@xxxxxxxxxxxx>
Subject: Re: [IBMiOSS] 65535 CCSID
The e-mail below is from an external source. Please do not open attachments or click links from an unknown or suspicious origin.
On Tue, Dec 19, 2017 at 5:14 PM, Jeremy Meyer <JMeyer@xxxxxxxxxxxxx> wrote:
Python 3 locally on the IBM i. Anytime I query a 65535 field I get what appears to be hex.
OK. What I was really after is: What's the data type of the database field, and most importantly, what's the Python data type that gets retrieved?
I'm guessing the database field is some flavor of character. In Python, I can imagine a few possibilities (I don't have easy access to your combination of CCSID 65535 and Python to test for myself).
Hopefully you have type `bytes` or possibly `bytearray`. Then it is a simple matter to use the `decode` method. However, if you have `str`, then it could be tricky.
This is the IBMi Open Source Roundtable (OpenSource) mailing list To post a message email: OpenSource@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
or email: OpenSource-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at https://archive.midrange.com/opensource
NOTICE: This electronic mail message and any files transmitted with it are intended
exclusively for the individual or entity to which it is addressed. The message,
together with any attachment, may contain confidential and/or privileged information.
Any unauthorized review, use, printing, saving, copying, disclosure or distribution
is strictly prohibited. If you have received this message in error, please
immediately advise the sender by reply email and delete all copies.
As an Amazon Associate we earn from qualifying purchases.