Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Create text file from variable adds rubbish characters



  • hi, Using Buildmaster 4.1.0 (B28) - the action to create a text file from a variable puts 3 rubbish (extended ascii) characters at the beginning of the file.

    It does not seem to matter how the variable is set (i.e. by "Set Variable Value" action or set from contents of a file).

    Product: BuildMaster
    Version: 4.1.0



  • If I had to guess, there's a BOM at the beginning of the file. Any way to create the file without that?



  • In the "create file" action properties, the file contents is only %VAR_NAME%. E.g. set variable action sets VAR_NAME=XXX

    The file is created with the correct variable value but with 3 extra bytes at the beginning.



  • We'll be adding some options to control text encoding for the actions which create a text file in 4.1.1, but in the meantime if you want to strip out the byte order marker, it should work to add a Search/Replace File Contents action immediately after the create file action that matches only the created file. Then, enable the Use Regular Expression option and put in a Regex that will match nothing, such as ^$

    The Search/Replace action should strip out the characters at the beginning of the file. Alternatively, it would be pretty straightforward to create an alternative Create File action that never writes a BOM using the script repository feature added in BuildMaster 4.1.



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation