Converting an Input File to an Encoding Compatible with File Masking (KBA9381)
KBA
KBA# 9381Applicable Delphix Versions
- Click here to view the versions of the Delphix engine to which this article applies
-
Major Release All Sub Releases 6.0 6.0.0.0, 6.0.1.0, 6.0.1.1, 6.0.2.0, 6.0.2.1, 6.0.3.0, 6.0.3.1, 6.0.4.0, 6.0.4.1, 6.0.4.2, 6.0.5.0, 6.0.6.0, 6.0.6.1, 6.0.7.0, 6.0.8.0, 6.0.8.1, 6.0.9.0, 6.0.10.0, 6.0.10.1, 6.0.11.0, 6.0.12.0, 6.0.12.1, 6.0.13.0, 6.0.13.1, 6.0.14.0, 6.0.15.0
5.3
5.3.0.0, 5.3.0.1, 5.3.0.2, 5.3.0.3, 5.3.1.0, 5.3.1.1, 5.3.1.2, 5.3.2.0, 5.3.3.0, 5.3.3.1, 5.3.4.0, 5.3.5.0, 5.3.6.0, 5.3.7.0, 5.3.7.1, 5.3.8.0, 5.3.8.1, 5.3.9.0 5.2
5.2.2.0, 5.2.2.1, 5.2.3.0, 5.2.4.0, 5.2.5.0, 5.2.5.1, 5.2.6.0, 5.2.6.1
5.1
5.1.0.0, 5.1.1.0, 5.1.2.0, 5.1.3.0, 5.1.4.0, 5.1.5.0, 5.1.5.1, 5.1.6.0, 5.1.7.0, 5.1.8.0, 5.1.8.1, 5.1.9.0, 5.1.10.0
5.0
5.0.1.0, 5.0.1.1, 5.0.2.0, 5.0.2.1, 5.0.2.2, 5.0.2.3, 5.0.3.0, 5.0.3.1, 5.0.4.0, 5.0.4.1, 5.0.5.0, 5.0.5.1, 5.0.5.2, 5.0.5.3, 5.0.5.4
How to Convert an Input File to a Compatible File Masking Encoding
When masking a file that is encoded as anything other than UTF-8 or plain text ASCII (for example ISO-8859-1), you will find that the file is converted to UTF-8 after masking. This is because the Continuous Compliance Engine (masking) only supports UTF-8 encoded or plain text ASCII as input formats.
As a result, you may find that special characters do not mask as expected.
To Convert an Input File to an Encoding Compatible with File Masking
Linux/Unix-based OS
- Check the current file encoding using the file command.
$ file myFile.txt myFile.txt: ISO-8859 text, with CRLF line terminators
- Convert the file using iconv, in the following example the file is converted from ISO-8859-1 to UTF-8.
$ iconv -f ISO-8859-1 -t UTF-8 < myFile.txt > myFile_UTF-8.txt
- Confirm that the file encoding has changed.
$ file myFile_UTF-8.txt myFile_UTF-8.txt: Unicode text, UTF-8 text, with CRLF line terminators
Windows
- Check the current file encoding using the Save As... dialog in Notepad. The encoding will be preselected in the Encoding dropdown.
- Convert the file using the following PowerShell command.
Get-Content .\myFile.txt | Set-Content -Encoding utf8 myFile_UTF-8.txt
- Confirm the converted file encoding using the Save As... dialog in Notepad.
Alternatively, you can convert the encoding using third-party software such as Notepad++ if you already have that installed.