8000 Not displaying correct characters when redirecting on Windows · Issue #136 · dduan/tre · GitHub
[go: up one dir, main page]

Skip to content
< 8000 link rel="preload" as="image" href="https://github.githubassets.com/assets/copilot-dark-2b28403b6080e898.png"/>

Not displaying correct characters when redirecting on Windows  #136

Open

Description

@1Korisnik

I use windows 10, cmd version 10.0.19045.4291. When I redirect output to file or to clip(e.g. tre | clip), and past content of it ,expanded characters used in displaying folder structure are displayed like this:

.
Γö£ΓöÇΓöÇ test05
Γöé Γö£ΓöÇΓöÇ logs
Γöé Γöé ΓööΓöÇΓöÇ dbt.log
Γöé Γö£ΓöÇΓöÇ Pipfile
Γöé Γö£ΓöÇΓöÇ Pipfile.lock
Γöé Γö£ΓöÇΓöÇ test
Γöé Γöé Γö£ΓöÇΓöÇ analyses
Γöé Γöé Γö£ΓöÇΓöÇ dbt_project.yml
Γöé Γöé Γö£ΓöÇΓöÇ logs
Γöé Γöé Γöé ΓööΓöÇΓöÇ dbt.log
Γöé Γöé Γö£ΓöÇΓöÇ macros
Γöé Γöé Γö£ΓöÇΓöÇ models
Γöé Γöé Γöé ΓööΓöÇΓöÇ example
Γöé Γöé Γöé Γö£ΓöÇΓöÇ my_first_dbt_model.sql
Γöé Γöé Γöé Γö£ΓöÇΓöÇ my_second_dbt_model.sql
Γöé Γöé Γöé ΓööΓöÇΓöÇ schema.yml
Γöé Γöé Γö£ΓöÇΓöÇ README.md
Γöé Γöé Γö£ΓöÇΓöÇ seeds
Γöé Γöé Γö£ΓöÇΓöÇ snapshots
Γöé Γöé ΓööΓöÇΓöÇ tests
Γöé Γö£ΓöÇΓöÇ test.txt
Γöé Γö£ΓöÇΓöÇ test04
Γöé ΓööΓöÇΓöÇ tre.exe
ΓööΓöÇΓöÇ tre.exe

instead of:

.
├── test05
│ ├── logs
│ │ └── dbt.log
│ ├── Pipfile
│ ├── Pipfile.lock
│ ├── test
│ │ ├── analyses
│ │ ├── dbt_project.yml
│ │ ├── logs
│ │ │ └── dbt.log
│ │ ├── macros
│ │ ├── models
│ │ │ └── example
│ │ │ ├── my_first_dbt_model.sql
│ │ │ ├── my_second_dbt_model.sql
│ │ │ └── schema.yml
│ │ ├── README.md
│ │ ├── seeds
│ │ ├── snapshots
│ │ └── tests
│ ├── test.txt
│ ├── test04
│ └── tre.exe
└── tre.exe

This also happens when I redirect output to text a file.

Activity

  1. ryanbuck182 commented on Apr 10, 2026

    @ryanbuck182

    I have the same exact issue. I am on Windows 11, command version 0.4.0. I tested with both tre | clip and sending it to a text file. Same issue regardless.

    .
    Γö£ΓöÇΓöÇ README.md
    Γö£ΓöÇΓöÇ data
    Γöé   ΓööΓöÇΓöÇ INSTRUCTIONS.md
    Γö£ΓöÇΓöÇ text.txt
    Γö£ΓöÇΓöÇ .gitignore
    Γö£ΓöÇΓöÇ Cargo.lock
    Γö£ΓöÇΓöÇ Cargo.toml
    ΓööΓöÇΓöÇ src
        Γö£ΓöÇΓöÇ main.rs
        ΓööΓöÇΓöÇ shared.rs
    
  2. ryanbuck182 commented on Apr 10, 2026

    @ryanbuck182

    Looked into it a little more and if you do the same thing with the default Windows tree command, not tre, it will automatically convert the characters to ASCII, so you'd get:

    C:.
    |   .gitignore
    |   Cargo.lock
    |   Cargo.toml
    |   README.md
    |
    +---data
    |       INSTRUCTIONS.md
    |
    \---src
            main.rs
            shared.rs
    

    Not sure what it'd involve, but it'd be a good idea for tre to do something similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0