Description

For some Mac OS/Linux Machines, Java does not have default UTF-8 encoding. This is necessary when generating data with special characters (Swedish characters, Japanese characters, etc.). 


The steps in this article can be used to manually set Java's character encoding to UTF-8. For this example, the screenshot examples are for Mac OS.


Step 1: Open bash.profile in a Terminal Window

  • Open the shell startup file through a terminal window. This is typically bash.profile.
  • Enter this command to open your .bash_profile:


nano bash.profile


Step 2: Add this line to the Shell start-up file 

  • Enter this line into your shell start-up file.


export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8



Step 3: Exit and Save Changes

  • Use Control + X to exit and save the changes.


  • Enter Y to save the change.


  • Then press the Enter key to finish.


Step 4: Run the Scenario

  • Run the Scenario at the command line using the genrocket -r command.


  • The following line will appear in the terminal window during test data generation: 



Step 5: Open the Output File in an Editor such as TextEdit

The example below contains address information for Saudi Arabia: