-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugWG-Quality-Testissues in a test or in test infrastructureissues in a test or in test infrastructure
Description
Now we don't have a full set of encoding tests (only for redirections). We need to create them during future Encoding RFC implementation (?).
In #3467 (discussion Issue #3248) we fix Default/OEM encoding behavior PowerShell Core on Windows (as in Windows PowerShell) but don't add tests (waiting the RFC). The simplest test (from @mklement0) is:
# Setup:
# Create a no-BOM UTF-8 file with the following literal content:
# 'ö'
# which, when executed as a PS script, should echo 'ö' back, IF the script
# was correctly decoded from UTF-8 by PS.
# UTF-8 bytes: 0x27 (single quote), 0xc3 0xb6 (encoding of 'ö', U+00F6), 0x27 (single quote)
[byte[]] (0x27, 0xc3, 0xb6, 0x27) | Set-Content -Encoding Byte /tmp/$PID.ps1
# Test: See if the 'ö' is echoed back correctly.
# Should return $True
'ö' -eq (& /tmp/$PID.ps1)
We need test for:
- File provider cmdlets
- Utility (and other) cmdlets
- Redirections
- Console Host
- Web cmdlets (Discussion Issue Webcmdlets should parse the <html><head><meta charset="foo"> attribute for the correct encoding if not in http header #3267)
- PowerShell engine source file reading
Metadata
Metadata
Assignees
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugWG-Quality-Testissues in a test or in test infrastructureissues in a test or in test infrastructure