Cannot get correct Traditional Chinese chars in Web Agent , Please help

Hi ,

I’m trying to provide a web agent to receive SOAP calls , sample code as below and [REQUEST_CONTENT]=<?xml version="1.0" encoding="utf-8"?>…

But I found the Traditional Chinese chars are transfered to something like “õ©¡µûç” , how can I do with this ?

Set session =  New NotesSession	

Set inDoc = session.DocumentContext

incoming = inDoc.GetItemValue("Request_content")(0)

Subject: Cannot get correct Traditional Chinese chars in Web Agent , Please help .

Domino has to know to what charset the characters you’re sending to him belongs to. Not sure right now, but I think this should be done via the accept-charset http header

Subject: I think I’ve got the solution to get correct Traditional Chinese chars in Web Agent .

After a lot of trying & testing , I think I’ve found a way to solve this problem , sharing with everybody who may need to solve this kind of problem.Domino seems to take cgi variable itemvalues as LMBCS charset in a web agent . So , in R6.5 , I use a new class LCStream and set the charset as LMBCS to receive the original itemvalue , then Reset the format of this LCStream to UTF8 , finally I got the correct chars . sample code as below :

Option Public

Uselsx “*lsxlc”

Sub Initialize

Set session =  New NotesSession	

Set inDoc = session.DocumentContext



Dim msg As New LCStream (0, 0, LCSTREAMFMT_LMBCS)

msg.Text = inDoc.GetItemValue("Request_content")(0)

Call msg.ResetFormat (LCSTREAMFMT_UTF8)

incoming=msg.Text

Print incoming

End Sub