A webservice runs a procedure that has an inputparameter ipMylongchar as longchar no-undo.
I believe that the ipMylongchar has codepage fixed as -cpInternal ? So if a customer sends filecontent that is converted as UTF-8, it will be wrong?
So if different customer uses the webservice and sends different codepageformat, it would be pretty messy.
Is the solution to start several services, with different -cpinternal ? or could it be done in another way?
When passing longchars as parameters, the receiving end (callee for input, caller for output) will always use the same codepage the passing end used.
In this case:
I would assume the SOAP adapter/transport is smart enough to fix the codepage to the encoding used in the request.
So the ipMylongchar would match the encoding from the request.
And any conversion to your -cpinternal is something you need to take care of yourself.
If my assumption is wrong and the adapter/transport doesn't fix the codepage, then indeed you'd get an unfixed longchar which the AVM will then assume is in your -cpinternal codepage.
> On Aug 8, 2018, at 9:41 AM, goo wrote:
> Are you saying that a longchar with codepage ISO8859 should be able to hold codepage UTF-8?
You probably know this already, but:
ISO 8859 is a single byte code page with 8-bit characters. there are several (minor) variants for different part of europe. details here: en.wikipedia.org/.../IEC_8859 with character maps. 8859-15 is frequently used in Windows systems and elsewhere.
UTF-8 is a multi-byte code page with characters that are 1, 2, 3, or 4 bytes long, depending on the character being represented.
UTF-8 has my characters that cannot be converted to a single byte of ISO-8859.
BTW: 7-bit ASCII is a proper subset of UTF-8.=
hmmm I sent a smily, but it does not look like one
Peter, I did not find SET-CODEPAGE(... did you mean FIX-CODEPAGE(longchar) = 'UTF-8' ?
but you can you use that for an input parameter ?
My problem is that we have a Method that reads files from an FTP site, and using an appserver procedure (or a SOAP webservice) With an input parameter as longchar. Since I am not able to change the longchar With a fix-codepage, I am stucked With the codepage that is started With -cpinternal (or that is what my knowledge is telling me, am I wrong ? )
Could you just use GET-CODEPAGE on that input parameter and see what it gives you? If the SOAP request uses an UTF-8 encoding and the longchar doesn't match that then I would say you should raise that with TS but you might be suprised to find out that this is not the same as 'cpinternal' as you expect ;)