Variable not correctly being replaced

Hey,

Strange situation here. I’m wanting to replace a variable token with a £ sign and for some reason it is replacing it with a ? instead. Does anybody have a reason as to why this might be happening?

For example, the json file contains the line:

currencyPrefix: '#{i18n:currencyPrefix}',

And the variable is defined in Octopus as:

i18n:currencyPrefix = "£"

And the output is:

currencyPrefix: '£',

I’ve checked file encoding and it’s UTF8.

Not really sure what to look for so any help is appreciated

Hi Mathew,

Thanks for getting in touch! I’m sorry you’re hitting this substitution issue. Just to confirm, you have utf-8 defined in the Output file encoding section in the substitute variables in files feature?

I’ve given this a test in my local instance running 2018.9.0 and it substitutes this £ character as expected using utf-8 encoding. Which version are you currently running? It’s possible you could be hitting a bug (possible this one) and upgrading would fix it.

I look forward to hearing back and getting to the bottom of this one!

Best regards,

Kenny

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.