Hi Guys
How does Cloud Octopus handle a Variable with a value that contains an accent? Ex: Namé
I’m trying to replace variables in files and the Namé value is getting changed to Nam? in the Transform.
Hi Guys
How does Cloud Octopus handle a Variable with a value that contains an accent? Ex: Namé
I’m trying to replace variables in files and the Namé value is getting changed to Nam? in the Transform.
Hi Gert,
Thanks for reaching out to us regarding your issue. Could you confirm a few details for me?
Are you using the ‘Deploy a Package’ step for this, and what kind of file are you transforming? This should usually work, but we have seen some cases where it doesn’t.
Here is a similar report, and it appeared to be related to a BOM existing in one config file and not the other - Variables with values containing unicode characters are not transformed correctly
With the default setting for Output file encoding - (detect from template) we use the existence of the Byte Order Mark (BOM) in the source transform file, not the attribute in the XML header to determine the correct encoding.
If you are doing something similar to the above report, it is worth checking to see if you have a different encoding in a transform config than the source config.
Kind regards,
Hi Jim
Thanks for the quick response.
I am using the Deploy a Package step with Substitute Variables in files. The script is currently in UTF-8 (I used Notepad++ to have a look.) and then I’m just replacing it using a Project Variable. Is there anything else I would need to do normally?
Thanks Gert,
No, normally you shouldn’t have to do anything extra, the encoding auto-detection works well. Sorry that this isn’t working as expected in your case!
You could try forcing it to use utf-8 in the Step configuration.
The list of encodings we support are in the Remarks section on this page: https://docs.microsoft.com/en-us/dotnet/api/system.text.encoding?redirectedfrom=MSDN&view=netframework-4.7.2
While you try that out, I’m going to try reproducing this locally to see if I can see what you are seeing.
I’m hoping that you could provide me some other things if they aren’t too sensitive to share:
Kind regards,
Hi Gert,
I’ve had a look into things for you, and I’m sorry to say that you have found an encoding issue! The work around that I suggested of forcing the output file encoding
to utf-8
appears to work on my VM - so I’d recommend giving that a try.
I’m in the process of discussing this internally, we’ll raise an issue on github for you to track soon - I’ll update this thread with that as it happens.
Thanks again for your patience and let me know if there are any more details I can get for you.
Kind regards,
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.