When I look at the apachedft job I see these attributes:
CODED CHARACTER SET IDENTIFIER . . . . . . . . . : 65535
DEFAULT CODED CHARACTER SET IDENTIFIER . . . . . : 37
I've searched and found this thread where Scott mentioned having an issue converting to EBCDIC to ASCII if the header has "application/" in the type, which mine does, being a JSON file. I've tried adding ccsid(*utf8) to the data variable and sending that in the QtmhWrStout command, but I'm still getting garbage.
I tried adding the the DefaultFsCCSID and DefaultNetCCSID as you mentioned above as well with no improvement. Any suggestions? Thanks in advance!Personally, the setup I use is like this:
DefaultFsCCSID 37
DefaultNetCCSID 1208
CgiConvMode %%MIXED/MIXED%%
This tells Apache that my local system is CCSID 37 for EBCDIC (you might want 278 for Sweden, I don't remember) and that the network should be CCSID 1208 (UTF-8). This will cause Apache to translate the data from UTF-8 to EBCDIC when receiving, or from EBCDIC to UTF-8 when sending.
If you leave off the DefaultNetCCSID, it will use CCSID 819, I believe -- and that's not Unicode, it's ASCII.
The other thing I've noticed is that if you use 'text/xml' it will translate it, but 'application/xml' will not. It seems to differentiate between text documents vs. non-text -- and since XML is text, but has 'application' it causes problems. Same for 'application/json'. Therefore, you may need to read into a CCSID(*UTF8) field in your RPG program, and convert it yourself. Depending on the circumstances.