Re: Unicode POST with IWebBrowser2::Navigate

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Jeff" <jeff.hillman@xxxxxxxxx> wrote in message
news:404276d9-959f-4642-ac49-bf33e3bf61fe@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Feb 20, 9:55 am, "Igor Tandetnik" <itandet...@xxxxxxxx> wrote:
I suggest you use UTF-8, and specify appropriate charset in
Content-Type header.

Thank you very much for your reply. If you don't mind, could I ask
for a little clarification? I assume the Content-Type header would be
"Content-Type: text/xml; encoding=utf-8\r\n"

charset=, not encoding=

but I'm not sure how I
would use that encoding in my call to IWebBrowser2::Navigate. What do
I need to do differently to initialize the "VARIANT *PostData"
parameter?

Nothing. It's still an array of bytes. Presumably, you have a Unicode
string you want to post. Convert it to UTF-8 with
WideCharToMultiByte(CP_UTF8), then pack the resulting bytes into a
safearray.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


.



Relevant Pages

  • Re: Unicode POST with IWebBrowser2::Navigate
    ... for a little clarification? ... I assume the Content-Type header would be ... would use that encoding in my call to IWebBrowser2::Navigate. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: How do search engines index multilingual content?
    ... > Andreas Prilop wrote: ... >> Google Groups still ignore the charset parameter of Usenet ... encoding, and only returned pages which used that same encoding. ...
    (comp.infosystems.www.authoring.html)
  • Re: Understanding simplest HTML page
    ... the media type of data needs to be expressed outside the ... Well, at least in /some/ encoding which has us-ascii as a subset, ... on-the-fly transcoding into a suitable encoding for HTTP transmission. ... With HTML, on the other hand, if it contains "meta charset" ...
    (comp.infosystems.www.authoring.html)
  • Encoding problems / Perl 5.8.0 / XML::LibXML / XML::LibXSLT
    ... I'm having a problem with charset encodings that I desparately need some ... I am transforming XML source into XHTML using an encoding of iso-8859-1 ... characters preceeding some characters generated from an entity ... complete with encoding specification; however, ...
    (comp.lang.perl.misc)
  • restarting the read after ChangedCharSetException
    ... the Reader with the charset extracted from CharSetSpec before restarting the ... {Exception eencode = getpage(url, encoding); ...
    (comp.lang.java.programmer)