Page MenuHomeDevCentral

Define UTF-8 environment in service
ClosedPublic

Authored by dereckson on Oct 16 2018, 13:02.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 13:21
Unknown Object (File)
Fri, Nov 22, 10:11
Unknown Object (File)
Fri, Nov 22, 06:52
Unknown Object (File)
Thu, Nov 21, 23:39
Unknown Object (File)
Wed, Nov 13, 11:13
Unknown Object (File)
Tue, Nov 12, 17:19
Unknown Object (File)
Mon, Nov 11, 10:01
Unknown Object (File)
Sun, Nov 10, 20:06
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.