<div dir="ltr"><div class="gmail_default" style="font-size:large">> That proves the problem is unrelated to sockets. Is is related to string/encoding handling.</div><div class="gmail_default" style="font-size:large"><br></div><div class="gmail_default" style="font-size:large">Now that makes a lot more sense than the socket doing goofy magic. The string layer in FPC doing goofy magic!</div><div class="gmail_default" style="font-size:large"><br></div><div class="gmail_default" style="font-size:large">I am trying your .sh script idea now...<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 29, 2020 at 9:42 AM Nikolai Zhubr via fpc-devel <<a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi!<br>
<br>
29.01.2020 18:07, Ozz Nixon via fpc-devel:<br>
> 1. My code does not directly interact with any environment variables.<br>
<br>
Ok.<br>
<br>
> ExecStart=/usr/local/bin/coderunner2<br>
<br>
I'd suggest, as a quick and horrible temporary hack/test, replace this <br>
direct binary call with a shell wrapper, lets name it e.g. <br>
coderunner2.sh, containing something like:<br>
<br>
#!/bin/sh<br>
echo "LANG=$LANG" >>/tmp/test.txt<br>
echo "LOCALE=$LOCALE" >>/tmp/test.txt<br>
export LC_ALL=C<br>
/usr/local/bin/coderunner2<br>
<br>
(Put it into /usr/local/bin/ as otherwise systemd might refuse it; I <br>
suppose the script is simple enough to be self-explanatory)<br>
<br>
> 3. I do not see anything in that file that would override socket output.<br>
<br>
Sure.<br>
<br>
> 5. per wireshark, tcpdump (if the same) - it shows '?' is being sent<br>
> when the daemon is managed by systemctl, and the expected 8bit is sent<br>
> when ran at the shell prompt.<br>
<br>
That proves the problem is unrelated to sockets. Is is related to <br>
string/encoding handling.<br>
<br>
<br>
HTH...<br>
<br>
Regards,<br>
Nikolai<br>
_______________________________________________<br>
fpc-devel maillist - <a href="mailto:fpc-devel@lists.freepascal.org" target="_blank">fpc-devel@lists.freepascal.org</a><br>
<a href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel" rel="noreferrer" target="_blank">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a><br>
</blockquote></div>