cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Weird Encoding issue with building a string value

I'm not sure if I should post this as a bug or not. I hesitate to but I found it a pain in the ... so I thought I'd share and possibly learn more about the process.

In a workflow I built, I needed to combine a couple of strings together and then add them to a general body of text that would then be exported to a CSV file via the Web Request action. All worked well except that some of the strings had an  in them.

example: max. size of 200Â mm

These particular strings were created by combining strings using the Set Variable Action = max. size of {workflow variable:max size} mm

It seems that while using that control (set variable) for strings, it does not use utf-8 charset. (I guess that's because it's not just for strings)

Using the Build String Action resolved the issue which leads me to believe that's the proper/intentional way to set any string variable (especially when combining strings).

Is this intentional?

Labels: (2)
Tags (1)
0 Kudos
Reply
4 Replies
Not applicable

Re: Weird Encoding issue with building a string value

What was the original value of the variable 'max size' before it was converted to 200Â?

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Weird Encoding issue with building a string value

max size variable/column was a number type. It was 200.

so firstString = "max. size of"

maxSizeValue = 200

secondString = "mm"

Now to combine them firstString maxSizeValue secondString

in Set Variable action this results in the extra char being added

in Build String action this produces the properly formatted result

0 Kudos
Accept as Solution Reply
Not applicable

Re: Weird Encoding issue with building a string value

I set up a workflow to test this and using the Set Variable action resulted in "max. size of 200 mm" for me on SP2013 with Nintex Workflow 2013.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Weird Encoding issue with building a string value

The issue becomes when you try and export it to a CSV file via the Web Request method. So while the two methods appear to give the same result string, they actually do not because they "seem" to use a different charset. Build string uses utf-8 (which is what we want for a string) and the Set Variable action does not. (which may make sense since it's not just for string) I just wanted to understand the process/explanation of why.

The only way you'll see the difference though, is after the export!

0 Kudos
Accept as Solution Reply