Skip to main content
Solved

HTTP connector - encoding - nvarchar


Hugo Nienhuis
Superhero
Forum|alt.badge.img+12

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.

Best answer by Vincent Doppenberg

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.

View original
This topic has been closed for replies.

2 replies

Forum|alt.badge.img+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.


Hugo Nienhuis
Superhero
Forum|alt.badge.img+12

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