Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Output of non-ascii characters via pipe

May
238
2
I have some files containing non-ascii characters, it can be either Scandinavian characters like åäö, but also non-ascii apostrophes and accent marks.

Do someone know why this happens:

C:\User\temp\ok>dir /b åäö*
åäö.7z
åäö.rar

When just outputting them via DIR they display correctly.

C:\User\temp\ok>dir /b åäö* | for %x in (@con) echo %x
???.7z
???.rar

But if I do the equivalent thing with a pipe they are garbled.

...

I actually found the problem when I wrote up this, if I enable Unicode output it works as I want to.

However, can there be other side-effects to doing that? I just read another post that HISTORY /R does not work with Unicode input files. Does this option also affect how SHRALIAS saves the history when it unloads?
 
nikbackm wrote:

> I have some files containing non-ascii characters, it can be either Scandinavian characters like åäö, but also non-ascii apostrophes and accent marks.
>
> Do someone know why this happens:
>
> C:\User\temp\ok>dir /b åäö*
> åäö.7z
> åäö.rar
>
> When just outputting them via DIR they display correctly.
>
> C:\User\temp\ok>dir /b åäö* | for %x in (@con) echo %x
> ???.7z
> ???.rar
>
> But if I do the equivalent thing with a pipe they are garbled.
>
> ...
>
> I actually found the problem when I wrote up this, if I enable Unicode output it works as I want to.
>
> However, can there be other side-effects to doing that? I just read another post that HISTORY /R does not work with Unicode input files. Does this option also affect how SHRALIAS saves the history when it unloads?

The problem with HISTORY /R was fixed several builds ago.

It does not affect SHRALIAS, which always saves in Unicode format.

Rex Conn
JP Software
 

Similar threads

Back
Top