INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: MCWS - Char Encoding Q  (Read 3399 times)

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14464
  • I won! I won!
MCWS - Char Encoding Q
« on: July 31, 2016, 07:31:48 am »

Q - regarding a MCWS call to get extended ASCII characters. 

For example a MC field may contain "Frédéric Chopin, Antonín Dvořák"

If I use File--> Library--> Export to XML, I get a file titled
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

and within it

<Field Name="Description">Frédéric Chopin, Antonín Dvořák</Field>

Looks good......

However, If I call MCWS using:

  WinHTTP := ComObjCreate("WinHTTP.WinHttpRequest.5.1")
  ComObjError(false)
  WinHTTP.Open("GET", http://localhost:52199/MCWS/v1/Files/Search?Action=mpl&ActiveFile=-1&Zone=-1&ZoneType=ID)
  WinHTTP.SetCredentials(MC_UserName,MC_Password,0)
  WinHTTP.SetRequestHeader("Content-type", "application/x-www-form-urlencoded")
  Body = ""
  WinHTTP.Send(Body)
  Result := WinHTTP.ResponseText
  Status := WinHTTP.Status


I get a file with a header saying
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

and within it

<Field Name="Description">Frédéric Chopin, Antonín DvoÅ?ák</Field>

Am I malforming my Request Header?

Thanks
Nathan
Logged
JRiver CEO Elect

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10939
Re: MCWS - Char Encoding Q
« Reply #1 on: July 31, 2016, 09:29:33 am »

I get a file with a header saying
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

and within it

<Field Name="Description">Frédéric Chopin, Antonín DvoÅ?ák</Field>

Am I malforming my Request Header?


This looks like UTF-8 encoded strings, you are probably just interpreting it wrong.
Logged
~ nevcairiel
~ Author of LAV Filters

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14464
  • I won! I won!
Re: MCWS - Char Encoding Q
« Reply #2 on: August 14, 2016, 05:45:55 pm »

Thanks - got it sorted
Logged
JRiver CEO Elect
Pages: [1]   Go Up