-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EBCDIC conversion of argments on IBMi(OS400) is broken #15570
Comments
The fix below fixes CURL so it does work fine on IBMi. @@ -59,12 +59,14 @@ int main(int argc, char **argv)
char *inbuf;
char *outbuf;
size_t inbytesleft;
size_t outbytesleft;
char dummybuf[128];
- const char *tocode = "IBMCCSID01208"; /* Use UTF-8. */
- const char *fromcode = "IBMCCSID000000000010";
+ /* To/From codes are 32 byte long strings with
+ reserved fields initialized to ZEROs */
+ const char tocode[32] = {"IBMCCSID01208"}; /* Use UTF-8. */
+ const char fromcode[32] = {"IBMCCSID000000000010"};
ebcdic_argc = argc;
ebcdic_argv = argv;
/* Build the encoding converter. */ |
Any chance you can provide this patch as a full fledged PR? |
Will work on it. |
andrewkirillov-ibm
added a commit
to andrewkirillov-ibm/curl
that referenced
this issue
Nov 13, 2024
Fixing issue curl#15570, where IBMi EBCDIC conversion of command line arguments got broken.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I did this
I compiled 8.11.0 release on IBM i V7R4M0 system. For this I applied a fix suggested in #15566, as the released version does not build on IBMi. However CURL does not seem to be function well.
The reason for this is the fix to #15214. As a result of it iconv_open() fails to initialize conversion. The IBMi docs say that both to/from conversion codes are 32 byte long strings. And all reserved fields MUST be set to zeros.
https://www.ibm.com/docs/en/i/7.5?topic=ssw_ibm_i_75/apis/iconvopn.html
I expected the following
I expect CURL command to handle command line arguments correctly on IBMi/OS400 platform.
curl/libcurl version
8.11.0
operating system
OS400 V7R4M0
The text was updated successfully, but these errors were encountered: