Skip to content

Why only show ASCII characters in preview, not all UTF-8? #174

@rustyhu

Description

@rustyhu

When previewing text files, I noticed that non-ASCII Unicode characters (such as emoji or languages other than English) are not displayed, only ASCII is shown. Looking at the code, it seems the preview logic previously used a function to filter out non-ASCII characters.

walk/main.go

Line 910 in c78d211

previewContent := leaveOnlyAscii(content)

I have many files contain UTF-8 characters. I have tried to edit this code to show all UTF-8, then in my simple tests all preview of UTF-8 content look good. Maybe my tests are limited.

Is there a specific reason for this design? Thanks for your explanation!

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