chaperone icon indicating copy to clipboard operation
chaperone copied to clipboard

Syslog implementation does remove utf-8 characters

Open rmoriz opened this issue 9 years ago • 1 comments

Scenario:

  • syslog functionality enabled by default
  • service writes utf-8 characters to stdout/stderr, for example "request processed in 100 µs"
  • chaperone/Python does remove the utf-8 charcater => "request processed in 100 s"

Config:

settings: {
  env_set: {
    'LANG': 'en_US.UTF-8',
    'LC_CTYPE': '$(LANG)'
  }
}

test.service: {
  command: '/display-utf8.sh',
}

console.logging: {
  enabled: true,
  stdout: true
}

display-utf8.sh:

#!/bin/bash

echo "++++TEST++++"
echo "request processed in 100 µs"
echo "++++/TEST++++"

rmoriz avatar Oct 07 '16 15:10 rmoriz

Relevant source code: https://github.com/garywiz/chaperone/blob/6fbb8b6b1a90a1cf1cea646739f86fe9a576ee92/chaperone/cproc/subproc.py#L27

rmoriz avatar Oct 07 '16 15:10 rmoriz