[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: question about none english character when using HTTPAPI
Hi have now tried to set debug to save file as UTF-8
this is how it looks
filename="F��F��_DOKUMENT_123456
I also write down the converted XML to file as UTF-8 and in that file
the result look like this!!
filename="F��DOKUMENT_123456
-- Den ons 2010-03-03 skrev Thomas Raddatz
<thomas.raddatz@xxxxxxxxxxx>:
Från: Thomas Raddatz <thomas.raddatz@xxxxxxxxxxx>
�ne: Re: question about none english character when using HTTPAPI
Till: "HTTPAPI and FTPAPI Projects" <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Datum: onsdag 3 mars 2010 21.07
Johan,
I would not bet that the data appear in the debug log as it is send
over
the wire, because by default HTTP API uses CCSID 819 for the log file.
It seems that changing the CCSID with HTTP_SetfileCCSID(1208) will
translate the data to 1208 before adding it to the debug log:
HTTP_SetfileCCSID(1208);
HTTP_debug(*ON: 'yourDebugFile');
Do not forget to delete the existing debug file in order to start a
new one.
Regards,
Thomas.
Johan Wigh schrieb:
> Hi! Thomas!
> I have now tried to write the files to the IFS both with your
> testdriver! I have even written my own XML the same way!
> When lI look at the file through The Iseries Navigator it looks
OK and
> the swedish character looks OK So the Conversion seems ok!
> I have looked at the debug files generated from HTTPAPI there are
he
> swedish character not ok! Maybe i have recompile the HTTP and
set
> another CCSID in the program?
> /Johan
> --- Den ons 2010-03-03 skrev [1]thomas.raddatz@xxxxxx
> <[2]thomas.raddatz@xxxxxx>:
>
> Från: [3]thomas.raddatz@xxxxxx <[4]thomas.raddatz@xxxxxx>
> �ne: Re: question about none english character when using
HTTPAPI
> Till: [5]ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> Datum: onsdag 3 mars 2010 10.28
>
> Johan,
> I suggest to use the attached test program to convert the swedish
'�
> to
> UTF-8 and verify the result. I used CRTRPGMOD and CRTPGM to
create it:
> crtrpgmod raddatz/test_iconv raddatz/qsrc37 dbgview(*list)
> crtpgm raddatz/test_iconv actgrp(*new)
> Make sure to change AtSign37 to the swedish '� and adjust the
path
> name
> of the output file before compiling the program.
> If everything is fine I assume that the problem is at the
receiving
> side.
> By the way, did you properly specify <?xml version="1.0"
> encoding="UTF-8"?> at the beginning of your request message?
> Furthermore you may ask your network guy to trace the
communication
> data.
> That often helps a lot to solve a problem.
> Regards,
> Thomas
> [1][6]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx schrieb am 02.03.2010
> 21:25:05:
> > Von:
> >
> > [2][7]johan_wigh@xxxxxxxx
> >
> > An:
> >
> > [3][8]ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> >
> > Datum:
> >
> > 02.03.2010 21:59
> >
> > Betreff:
> >
> > Re: question about none english character when using HTTPAPI
> >
> > Gesendet von:
> >
> > [4][9]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
> >
> > If i try to answer
> > To anser point 1-41. I have tried different methods of
approach
> > both the XML stored in database file and written straight
into
> > the program! No really difference at all! Same problem occur!
> > 5. The CCSID of the machine and job is 65535!
> > The strange thing is that when i consume webservice that in the
> > response send back the swedish letter of �i can read the
variable
> > ok. The problem is that when im sendning the same letter �to
> > anotther webservice it comes out wrong as ?? on the other side!
> > I have tried both with and without the function
HTTP_setCCSIDs(1208
> > :0). and using the XML enconding tag UTF-8 and ISO-8859-1
> > /Johan
> >
> >
> >
> >
> >
> >
> >
> > --- Den tis 2010-03-02 skrev Thomas Raddatz
> <[5][10]thomas.raddatz@xxxxxxxxxxx>:
> >
> > Från: Thomas Raddatz <[6][11]thomas.raddatz@xxxxxxxxxxx>
> > �ne: Re: question about none english character when using
HTTPAPI
> > Till: "HTTPAPI and FTPAPI Projects"
> <[7][12]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
> > Datum: tisdag 2 mars 2010 20.33
> >
> > Johan,
> >
> > I do not know whether I will be able to solve your CCSID
problem
> entirely
> > or not. I am also not sure that the following explanation
explains
> the ?
> > character(s) at the receiving side. Nevertheless, please answer
the
> > following questions:
> >
> > 1) Are the non-english characters hard coded literals such as
'Hello
> World'?
> >
> > 2) If the non-english characters are literals, what is the
CCSID of
> your
> > source physical file?
> >
> > 3) Are the non-englich characters read from a file?
> >
> > 4) If the non-english characters are read from a file, what is
the
> CCSID
> of
> > the file.
> >
> > 5) What is the CCSID of your job?
> >
> >
> > There are several potential reasons for the problem:
> >
> > a) If your job CCSID is 65535 (=*HEX) and the characters are
read
> from a
> > file, no CCSID conversion (file to job) takes place. But HTTP
API
> converts
> > the data from the job CCSID to 1208 with HTTP_setCCSIDs(1208
:0).
> >
> > b) If the CCSID of your source physical file does not match the
> CCSID of
> > your job (parameter CCSID or default CCSID for CCSID=65535) the
> literals
> in
> > your program do not have the same CCSID of your job and hence
HTTP
> API
> > cannot correctly translate the request message with
> HTTP_setCCSIDs(1208
> :0).
> >
> > Example:
> > I wrote a module with CCSID 37 that uses iconv() to translate
the
> '@'
> > character to CCSID 1208. It then writes the UTF-8 data to a
file in
> binary
> > mode. When I run the job with CCSID 37 everything works like a
> charm.
> But
> > when I change the job CCSID to 273 (German) the '@' sign is
> converted to
> '§'.
> >
> > Regards,
> >
> > Thomas
> >
> >
> >
> >
> > Johan Wigh schrieb:
> > > Hi!
> > >
> > > Im testing to use HTTPAPI for sending Soap messages to
internal
> > > webservice att our business!
> > >
> > > But when im consuming a webservice and sendning "non
english"
> > > character i get "??" on the receiving side
> > >
> > > I have tried to set the CCSID to UTF-8
> > > HTTP_setCCSIDs(1208 :0); i get ??
> > > HTTP_setCCSID(1252:0) i get ?
> > >
> > > The webservice im using is based in a windows enviroment
and is
> > > supposed to use UTF-8
> > >
> > >
> > >
> > > When Im consuming another webservices that and receiving
none
> english
> > > characters it works fine and it recieves the non english
> characters
> > > ok! with and without HTTP_setCCSID!
> > >
> > > I found some topics around but i still cant figure out
what he
> problem
> > > can be
> > > /Johan from Sweden
> > >
> > >
> > > __________________________________________________
> > > Använder du Yahoo!?
> > > � du trött på spam? Yahoo! E-post har det bästa
spamskyddet
> som
> finns
> > > [8][13]http://se.mail.yahoo.com
> > >
> > >
> > >
> > >
>
----------------------------------------------------------------------
> --
> > >
> > >
>
----------------------------------------------------------------------
> -
> > > This is the FTPAPI mailing list. To unsubscribe, please go
to:
> > > [9][14]http://www.scottklement.com/mailman/listinfo/ftpapi
> > >
>
----------------------------------------------------------------------
> -
> >
>
----------------------------------------------------------------------
> -
> > This is the FTPAPI mailing list. To unsubscribe, please go to:
> > [10][15]http://www.scottklement.com/mailman/listinfo/ftpapi
> >
>
----------------------------------------------------------------------
> -
> >
> >
> > __________________________________________________
> > Använder du Yahoo!?
> > � du trött på spam? Yahoo! E-post har det bästa
spamskyddet som
> finns
> > [11][16]http://se.mail.yahoo.com
> >
>
----------------------------------------------------------------------
> -
> > This is the FTPAPI mailing list. To unsubscribe, please go to:
> > [12][17]http://www.scottklement.com/mailman/listinfo/ftpapi
> >
>
----------------------------------------------------------------------
> -
> --
> IMPORTANT NOTICE:
> This email is confidential, may be legally privileged, and is for
the
> intended recipient only. Access, disclosure, copying,
distribution, or
> reliance on any of it by anyone else is prohibited and may be a
> criminal
> offence. Please delete if obtained in error and email
confirmation to
> the sender.
>
> -----Infogad bilaga följer-----
>
>
----------------------------------------------------------------------
> -
> This is the FTPAPI mailing list. To unsubscribe, please go to:
> [13][18]http://www.scottklement.com/mailman/listinfo/ftpapi
>
----------------------------------------------------------------------
> -
>
> __________________________________________________
> Använder du Yahoo!?
> � du trött på spam? Yahoo! E-post har det bästa spamskyddet
som finns
> [19]http://se.mail.yahoo.com
>
> References
>
> 1.
file://localhost/mc/compose?to=[20]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxx
om
> 2. file://localhost/mc/compose?to=[21]johan_wigh@xxxxxxxx
> 3.
file://localhost/mc/compose?to=[22]ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> 4.
file://localhost/mc/compose?to=[23]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxx
om
> 5. file://localhost/mc/compose?to=[24]thomas.raddatz@xxxxxxxxxxx
> 6. file://localhost/mc/compose?to=[25]thomas.raddatz@xxxxxxxxxxx
> 7.
file://localhost/mc/compose?to=[26]ftpapi@xxxxxxxxxxxxxxxxxxxxxx
> 8. [27]http://se.mail.yahoo.com/
> 9. [28]http://www.scottklement.com/mailman/listinfo/ftpapi
> 10. [29]http://www.scottklement.com/mailman/listinfo/ftpapi
> 11. [30]http://se.mail.yahoo.com/
> 12. [31]http://www.scottklement.com/mailman/listinfo/ftpapi
> 13. [32]http://www.scottklement.com/mailman/listinfo/ftpapi
>
>
>
>
----------------------------------------------------------------------
--
>
>
----------------------------------------------------------------------
-
> This is the FTPAPI mailing list. To unsubscribe, please go to:
> [33]http://www.scottklement.com/mailman/listinfo/ftpapi
>
----------------------------------------------------------------------
-
----------------------------------------------------------------------
-
This is the FTPAPI mailing list. To unsubscribe, please go to:
[34]http://www.scottklement.com/mailman/listinfo/ftpapi
----------------------------------------------------------------------
-
__________________________________________________
Använder du Yahoo!?
� du trött på spam? Yahoo! E-post har det bästa spamskyddet som
finns
http://se.mail.yahoo.com
References
1. http://se.mc234.mail.yahoo.com/mc/compose?to=thomas.raddatz@xxxxxx
2. http://se.mc234.mail.yahoo.com/mc/compose?to=thomas.raddatz@xxxxxx
3. http://se.mc234.mail.yahoo.com/mc/compose?to=thomas.raddatz@xxxxxx
4. http://se.mc234.mail.yahoo.com/mc/compose?to=thomas.raddatz@xxxxxx
5. http://se.mc234.mail.yahoo.com/mc/compose?to=ftpapi@xxxxxxxxxxxxxxxxxxxxxx
6. http://se.mc234.mail.yahoo.com/mc/compose?to=ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
7. http://se.mc234.mail.yahoo.com/mc/compose?to=johan_wigh@xxxxxxxx
8. http://se.mc234.mail.yahoo.com/mc/compose?to=ftpapi@xxxxxxxxxxxxxxxxxxxxxx
9. http://se.mc234.mail.yahoo.com/mc/compose?to=ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
10. http://se.mc234.mail.yahoo.com/mc/compose?to=thomas.raddatz@xxxxxxxxxxx
11. http://se.mc234.mail.yahoo.com/mc/compose?to=thomas.raddatz@xxxxxxxxxxx
12. http://se.mc234.mail.yahoo.com/mc/compose?to=ftpapi@xxxxxxxxxxxxxxxxxxxxxx
13. http://se.mail.yahoo.com/
14. http://www.scottklement.com/mailman/listinfo/ftpapi
15. http://www.scottklement.com/mailman/listinfo/ftpapi
16. http://se.mail.yahoo.com/
17. http://www.scottklement.com/mailman/listinfo/ftpapi
18. http://www.scottklement.com/mailman/listinfo/ftpapi
19. http://se.mail.yahoo.com/
20. http://se.mc234.mail.yahoo.com/mc/compose?to=ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
21. http://se.mc234.mail.yahoo.com/mc/compose?to=johan_wigh@xxxxxxxx
22. http://se.mc234.mail.yahoo.com/mc/compose?to=ftpapi@xxxxxxxxxxxxxxxxxxxxxx
23. http://se.mc234.mail.yahoo.com/mc/compose?to=ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
24. http://se.mc234.mail.yahoo.com/mc/compose?to=thomas.raddatz@xxxxxxxxxxx
25. http://se.mc234.mail.yahoo.com/mc/compose?to=thomas.raddatz@xxxxxxxxxxx
26. http://se.mc234.mail.yahoo.com/mc/compose?to=ftpapi@xxxxxxxxxxxxxxxxxxxxxx
27. http://se.mail.yahoo.com/
28. http://www.scottklement.com/mailman/listinfo/ftpapi
29. http://www.scottklement.com/mailman/listinfo/ftpapi
30. http://se.mail.yahoo.com/
31. http://www.scottklement.com/mailman/listinfo/ftpapi
32. http://www.scottklement.com/mailman/listinfo/ftpapi
33. http://www.scottklement.com/mailman/listinfo/ftpapi
34. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------