Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
MGjergji1654699655
Contributor II
Contributor II

tRest component encoding error

I am creating a multipart request and using it in the Http Body field in the component

I have the following case where the filename has an umlaut character in it:

Content-Disposition: form-data; name="attachment"; filename="BDP SBA für Q1 2021 pt1.jpg"

Up until the tRest component the request body is logged correctly

In my server the request is showed as:

Content-Disposition: form-data; name="attachment"; filename="BDP SBA für Q1 2021 pt1.jpg"

Labels (3)
1 Solution

Accepted Solutions
MGjergji1654699655
Contributor II
Contributor II
Author

Found the solution!

I set the value of the field filename like this:

filename = MimeUtility.encodeText(filename , null, "Q");

Loaded the javax.mail library using tLibraryLoad

View solution in original post

3 Replies
Anonymous
Not applicable

You appear to be setting the charset correctly. Is the encoding on your server set to UTF-8? also, are you running this job on that server or simply sending the file to that server?

MGjergji1654699655
Contributor II
Contributor II
Author

Found the solution!

I set the value of the field filename like this:

filename = MimeUtility.encodeText(filename , null, "Q");

Loaded the javax.mail library using tLibraryLoad

MGjergji1654699655
Contributor II
Contributor II
Author

Thank you for your help, I was just sending the file to the server and I think the encoding was set to UTF 8