ebcdic

php - convert ebcdic to ascii

懵懂的女人 提交于 2020-12-04 12:59:17
问题 $my_var = "1"; $connection = db2_connect ( "*LOCAL", "ISCSC", "ISCSC" ); $strSql = 'CALL LMTLIB.ARTEST(?)'; $stmt = db2_prepare ( $connection, $strSql ); db2_bind_param($stmt, 1, "my_var", DB2_PARAM_INOUT, DB2_CHAR); $rc = db2_execute ( $stmt ); echo $my_var; When this code block executes, $my_var has the value ¦–¦ The test RPGLE program being called is returning wow When the program is altered, the characters i get back are different... so i know i'm getting back values from the program. The

php - convert ebcdic to ascii

久未见 提交于 2020-12-04 12:59:12
问题 $my_var = "1"; $connection = db2_connect ( "*LOCAL", "ISCSC", "ISCSC" ); $strSql = 'CALL LMTLIB.ARTEST(?)'; $stmt = db2_prepare ( $connection, $strSql ); db2_bind_param($stmt, 1, "my_var", DB2_PARAM_INOUT, DB2_CHAR); $rc = db2_execute ( $stmt ); echo $my_var; When this code block executes, $my_var has the value ¦–¦ The test RPGLE program being called is returning wow When the program is altered, the characters i get back are different... so i know i'm getting back values from the program. The

php - convert ebcdic to ascii

纵然是瞬间 提交于 2020-12-04 12:58:52
问题 $my_var = "1"; $connection = db2_connect ( "*LOCAL", "ISCSC", "ISCSC" ); $strSql = 'CALL LMTLIB.ARTEST(?)'; $stmt = db2_prepare ( $connection, $strSql ); db2_bind_param($stmt, 1, "my_var", DB2_PARAM_INOUT, DB2_CHAR); $rc = db2_execute ( $stmt ); echo $my_var; When this code block executes, $my_var has the value ¦–¦ The test RPGLE program being called is returning wow When the program is altered, the characters i get back are different... so i know i'm getting back values from the program. The

php - convert ebcdic to ascii

為{幸葍}努か 提交于 2020-12-04 12:58:18
问题 $my_var = "1"; $connection = db2_connect ( "*LOCAL", "ISCSC", "ISCSC" ); $strSql = 'CALL LMTLIB.ARTEST(?)'; $stmt = db2_prepare ( $connection, $strSql ); db2_bind_param($stmt, 1, "my_var", DB2_PARAM_INOUT, DB2_CHAR); $rc = db2_execute ( $stmt ); echo $my_var; When this code block executes, $my_var has the value ¦–¦ The test RPGLE program being called is returning wow When the program is altered, the characters i get back are different... so i know i'm getting back values from the program. The

How to convert EBCDIC with chinese chars to UTF-8 format

我的梦境 提交于 2020-06-26 13:51:07
问题 I have a requirement to convert a file with EBCDIC encoding which is encoded using the IBM937 code page to UTF-8 format for loading the file into a multi-byte enabled DB2 database. I have tried unix recode and iconv. None of them has the ability to convert IBM 937 to UTF8. I'm looking for any utility (java, perl, unix ) in this world which can do that on a unix based system. Can someone help me here? SL 回答1: Take a look at ICU (International Components for Unicode): http://site.icu-project

Decoding COMP-3 packed fields in an ASCII file in Python?

跟風遠走 提交于 2020-06-12 09:37:14
问题 I have a file that was formerly an EBCDIC-encoded file, which was converted to ASCII using dd. However, some lines contain COMP-3 packed fields which I would like to read. For example, the string representation of one of the lines I would like to decode is: '15\x00\x00\x00\x04@\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x0c777093020141204NNNNNNNNYNNNN\n' The field I would like to read is specified by PIC S9(09) COMP-3 POS. 3 , that is, the field that starts with the third byte and is nine bytes long

Converting String from One Charset to Another

£可爱£侵袭症+ 提交于 2020-03-18 03:02:05
问题 I am working on converting a string from one charset to another and read many example on it and finally found below code, which looks nice to me and as a newbie to Charset Encoding, I want to know, if it is the right way to do it . public static byte[] transcodeField(byte[] source, Charset from, Charset to) { return new String(source, from).getBytes(to); } To convert String from ASCII to EBCDIC , I have to do: System.out.println(new String(transcodeField(ebytes, Charset.forName("US-ASCII"),

Python byte representation of a hex string that is EBCDIC

此生再无相见时 提交于 2020-02-04 03:57:09
问题 I have a string in hex: Hex = 'E388854083969497A4A38599408881A2409985829696A38584408699969440814082A48783888583924B' As a byte object it looks like this: b'\xe3\x88\x85@'b'\xe3\x88\x85@\x83\x96\x94\x97\xa4'b'\xe3\x88\x85@'b'\xe3\x88\x85@\x83\x96\x94\x97\xa4'b'\xe3\x88\x85@\x83'b'\xe3\x88'b'\xe3\x88\x85@\x83\x96\x94\x97\xa4' In EBCDIC it is this: The computer has rebooted from a bugcheck. So I know that hex 40 (x40) is a 'space' in EBCDIC and its a '@' in ASCII I can't figure why python, when

COBOL COMP-3 number format issue

别来无恙 提交于 2020-01-16 05:38:07
问题 I have a cobol "tape format" dump which has a mixture of text and number fields. I'm reading the file in C# as a binary array (array of byte). I have the copy book and the formats are lining up fine on the text fields. There are a number of COMP-3 fields as well. The data in those fields doesnt seem to match any BCD format. I know what the data should be and I have the raw bytes of the COMP-3. I tried converting to EBCDIC first which yielded no better results. Any thoughts on how a COMP-3