Skip to content

How can encoding of Write-Output be known and/or controlled? #9152

@Liturgist

Description

@Liturgist

Support Question

It appears that Write-Output in 5.1 output UTF-8, but 6.1 outputs something else.

$ od -Ax -tx1c  ps5.1.17763.315.txt
000000  ff  fe  61  00  0d  00  0a  00  62  00  0d  00  0a  00  63  00
       377 376   a  \0  \r  \0  \n  \0   b  \0  \r  \0  \n  \0   c  \0
000010  0d  00  0a  00
        \r  \0  \n  \0
000014
$ od -Ax -tx1c  ps6.1.1.txt
000000  61  0d  0a  62  0d  0a  63  0d  0a
         a  \r  \n   b  \r  \n   c  \r  \n
000009

These were created using Write-Output @('a','b','c')

Is 6.1 producing UTF-8 without BOM? 1252? 437? 8859-1? ???

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-AnsweredThe question is answered.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions