Solved

HTTP connector - encoding - nvarchar

  • 31 March 2022
  • 2 replies
  • 89 views

Userlevel 3
Badge +11

I am using the HTTP-connector to sent a message with content-type application/json. I use a nvarchar(max) variable for the content input. I would like to know whether the http-connector sends the message UTF-8 encoded or UTF-16 encoded.

I would like to use a Content-Type application/json; charset=utf-8 but I suspect I have to encode the content as UTF-8. Is this best done using a varbinary(max) or should I do this in a different way?

 

Hope anyone can help.

icon

Best answer by Vincent Doppenberg 5 April 2022, 13:58

View original

This topic has been closed for comments

2 replies

Userlevel 6
Badge +4

Hello Hugo,

The HTTP connector will convert varchar and nvarchar strings in the Request content input parameter to binary data using the UTF-8 encoding. So in your case, I don’t think you have to worry about the encoding. Should you want a different encoding than UTF-8, then you should use a varbinary process variable and encode the data yourself in some other way.

I hope this helps.

Userlevel 3
Badge +11

Thanks Vincent, that was exactly what I needed to know.