Document TypeㅣTechnical Information
CategoryㅣMigration
Applicable Product Versionsㅣ 6FS01, 6FS02, 6FS03, 6FS04, 6FS05, 6FS06, 6FS07, 6FS07PS, 7FS01, 7FS02, 7FS02PS, 6FS01, 6FS02, 6FS03, 6FS04, 6FS05, 6FS06, 6FS07, 6FS07PS, 7FS01, 7FS02, 7FS02PS
Document Numberㅣ TMITI003
Overview
This guides you on how to encode DDL scripts extracted through T-UP.
Method
Note
The server environment uses UTF-8.
When extracting DDL using T-UP, .sql format text files are created. If the file encoding differs from the server's encoding, Korean characters may be corrupted upon uploading the files to the server. To prevent this, it is necessary to batch convert the encoding of these files to UTF-8 before uploading.
In a Windows environment, you can batch convert all .sql files in a folder to UTF-8 using PowerShell. Below is an example of encoding conversion using a PowerShell script.
### POWER SHELL input
$path = "D:\T-Up_20241029_win\DDL"
## Location of DDL scripts
$files = Get-ChildItem -Path $path -Filter "*.sql"
foreach ($file in $files) {
$content = [System.IO.File]::ReadAllText($file.FullName, [System.Text.Encoding]::GetEncoding("EUC-KR"))
[System.IO.File]::WriteAllText($file.FullName, $content, [System.Text.Encoding]::UTF8)
}