Page MenuHomeDevCentral

Define UTF-8 environment in service
ClosedPublic

Authored by dereckson on Oct 16 2018, 13:02.
Tags
None
Referenced Files
F3929895: D1930.id4875.diff
Sun, Dec 22, 11:20
Unknown Object (File)
Thu, Dec 19, 21:17
Unknown Object (File)
Thu, Dec 19, 20:53
Unknown Object (File)
Wed, Dec 4, 07:49
Unknown Object (File)
Wed, Dec 4, 07:48
Unknown Object (File)
Wed, Dec 4, 07:48
Unknown Object (File)
Wed, Dec 4, 07:28
Unknown Object (File)
Mon, Dec 2, 05:10
Subscribers
None

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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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