Skip to content

[BUG] <title>Powershell Output Includes ANSI Color Codes To Highlight Data Output #16437

@CityguyUSA

Description

@CityguyUSA

Is there an existing issue for this?

  • I have searched the existing issues

Description of the Issue

I'm redirecting output from a Powershell script and it's got tags to highlight different parts of the output with color, similar I guess to the 5.1 Powershell ISE where different parts of the command are highlighted using color.

Steps To Reproduce

  1. You can paste the following error into npp:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~�[0m
�[31;1m�[0m�[36;1m�[36;1m�[0m�[36;1m�[0m�[36;1m�[31;1m�[31;1m�[36;1m     | �[31;1mCannot find path 'E:\SharedData\jDownloader\cfg\downloadList4838991.zip' because it does not exist.�[0m
�[31;1mGet-ItemProperty: �[0mP:\Backup\BackupScripts\ArchiveAttributeUpdate.ps1:3�[0m
�[31;1m�[0m�[36;1mLine |�[0m
�[31;1m�[0m�[36;1m�[36;1m   3 | �[0m . es -ea SilentlyContinue -value ((�[36;1mGet-ItemProperty $_.fullname�[0m).Attrib .�[0m
�[31;1m�[0m�[36;1m�[36;1m�[0m�[36;1m�[0m�[36;1m     | �[31;1m

Current Behavior

NPP displays the file as text and does not interpret the ANSI color codes looks just like above.

Expected Behavior

Those codes should highlight the information into a colored text display. I cannot show you because this editor doesn't handle those codes either.

Debug Information

Notepad++ v8.7.7   (64-bit)
Build time : Feb  6 2025 - 03:19:13
Path : D:\Editors\NotePad++\notepad++.exe
Command Line : "P:\Backup\BackupLogs\LGGramDriveEBackup.log"
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
Periodic Backup : ON
Placeholders : OFF
DirectWrite : OFF
Multi-instance Mode : monoInst
File Status Auto-Detection : cdEnabledNew (for current file/tab only) + cdAutoUpdate
Dark Mode : ON
OS Name : Windows 10 Home (64-bit)
OS Version : 22H2
OS Build : 19045.5737
Current ANSI codepage : 1252
Plugins : 
    ColumnTools (1.4.5.1)
    ComparePlus (1.1)
    HexEditor (0.9.12)
    mimeTools (3.1)
    NotepadStarterPlugin (2.3.3)
    NppConverter (4.6)
    NppExport (0.4)

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions