summaryrefslogtreecommitdiff
path: root/test/testps8.ps1
blob: dc2bcfe7fb683f25144f6677f21cc3bb08359daa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# This script demonstrates how to use Unicode file names
# in a PowerShell script.
# This script is in UTF-8 encoding, with BOM.

$env:DOS2UNIX_DISPLAY_ENC = "utf8"

dos2unix -i uni_el_αρχείο.txt uni_zh_文件.txt

echo "test select-string:"

# select-string requires a BOM.
$env:DOS2UNIX_DISPLAY_ENC = "utf8bom"
dos2unix -i uni* | select-string -encoding utf8 -pattern αρχ

$env:DOS2UNIX_DISPLAY_ENC = ""