Forum Discussion

danielmbanks's avatar
danielmbanks
Occasional Contributor
8 years ago

Create File with UTF-8 encoding

Hi,

 

In the "Create File" test step, there are two options for "File encoding": Unicode and US-ASCII. Is there any way to instead use UTF-8 for the encoding? Or an alternative test step that could achieve the same result.

  • I have encountered this very issue.

     

    The problem is that Unicode is a bit ambiguous as it can be implemented by various different character encoding standards. While many would assume that it would use ubiquitous "UTF-8" character encoding Ready API in fact uses the valid but now obsolete "UCS-2" character encoding (I identified this using Notepad++).

     

    I raised this with SmartBear support and they reproduced and confirmed the issue. An enhancement request RIA-744 was raised to allow you to select the Unicode encoding you want to use. I'm unsure if and when this will be implemented.

     

    I was lucky I could get away with using US-ASCII, as an alternative you can look at Groovy to write files (This is what we did before the Create File step was implemented).

     

     

4 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Do you like to try it and see if you face any error?

    By the way, what is your OS? What does it show => Menu => Help => System Properties => file.encoding?
    • Radford's avatar
      Radford
      Super Contributor

      I have encountered this very issue.

       

      The problem is that Unicode is a bit ambiguous as it can be implemented by various different character encoding standards. While many would assume that it would use ubiquitous "UTF-8" character encoding Ready API in fact uses the valid but now obsolete "UCS-2" character encoding (I identified this using Notepad++).

       

      I raised this with SmartBear support and they reproduced and confirmed the issue. An enhancement request RIA-744 was raised to allow you to select the Unicode encoding you want to use. I'm unsure if and when this will be implemented.

       

      I was lucky I could get away with using US-ASCII, as an alternative you can look at Groovy to write files (This is what we did before the Create File step was implemented).

       

       

      • danielmbanks's avatar
        danielmbanks
        Occasional Contributor

        Great answer, thanks!

         

        Do you have a link to RIA-744? I've not seen the ReadyAPI enhancement requests process yet.