lemniscat-devops / lemniscat.plugin.powershell

A powershell plugin for lemniscat
MIT License
0 stars 0 forks source link

Powershell plugin does not support accented characters #8

Open bben92 opened 2 weeks ago

bben92 commented 2 weeks ago

The Powershell plugin does not support accented characters. Here is an example, with a code modification to better see the problem :

image

bben92 commented 2 weeks ago

Here is the code, if you want to use it to fix the issue :

def enqueue_stream(stream, queue, type):
    for line in iter(stream.readline, b''):
        try:
            decoded_line = line.decode('utf-8').rstrip('\r\n')
            queue.put(str(type) + decoded_line)
        except UnicodeDecodeError as e:
            print(f"Erreur de décodage : {e}")
            decoded_line = line.decode('utf-8', errors='ignore').rstrip('\r\n')
            queue.put(str(type) + decoded_line)