Page MenuHomeDevCentral

Define UTF-8 environment in service
ClosedPublic

Authored by dereckson on Oct 16 2018, 13:02.

Details

Summary

Environment wasn't set in service, and service ignores
shell locale, as it runs directly the process.

This fixes the characters UTF-8 rendered in ISO-8858-1 issue:

12:16:08 < thib> .+nom "Le Cun"
12:16:10 < Daeghrefn> thib : ne sont gérés comme que les caractères alphanumériques, le tiret, l'apostrophe droite, de même que tout ce qui n'est pas ASCII standard.

This also sets a good environment for launched Python
scripts to avoid Python to read file in ASCII:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xd8 in position 34: ordinal not in range(128)

Test Plan

Ensure environment is set correctly:

12:52:38 <dereckson> .tcl exec env
12:52:38 <daeghrefn> Tcl: PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/local/share/viperserv/bin
12:52:38 <daeghrefn> Tcl: HOME=/usr/local/share/viperserv
12:52:38 <daeghrefn> Tcl: LANG=en_US.UTF-8
...

Ensure messages are well printed in UTF-8:

13:01:01 < dereckson> .+nom """
13:01:02 < Daeghrefn> dereckson : ne sont gérés comme que les caractères alphanumériques, le tiret, l'apostrophe droite, de même que tout ce qui n'est pas ASCII standard.

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

dereckson requested review of this revision.Oct 16 2018, 13:02
dereckson created this revision.
dereckson edited the summary of this revision. (Show Details)Oct 16 2018, 13:03
dereckson edited the summary of this revision. (Show Details)
dereckson edited the test plan for this revision. (Show Details)
Thibaut120094 accepted this revision.Oct 16 2018, 13:33
This revision is now accepted and ready to land.Oct 16 2018, 13:33
This revision was automatically updated to reflect the committed changes.