This is a static archive of our old Q&A Site. Please post any new questions and answers at

LUA: Script fails claiming \n isn’t a printable UTF-8 after upgarde to WS 2.4



I have a LUA script that throws the following error:

**(tshark.exe:16500): ERROR**: Title for preference tsumcli.header isn't printable UTF-8.

The script line that tshark is complaining about is:

tsumcli.prefs.header = Pref.statictext("TRANSUM r14\n\n", "See the online manual for full details.")

If I remove the two new line characters I don't get the problem. Interestingly, I don't get the problem with the following line either:

tsumcli.prefs.tcpports = Pref.range("Output RTE data for these TCP service ports", "25,80,443,1433", "Add and remove ports numbers separated by commas\nRanges are not supported", 65535)

Is \n illegal or is this a bug?

Thanks and regards...Paul

asked 02 Aug '17, 10:15

PaulOfford's gravatar image

accept rate: 11%

One Answer:


\n isn't a printable UTF-8 character; control characters aren't printable characters. Newlines, tabs, etc. do not belong in preference titles.

If I remove the two new line characters I don't get the problem.

That is the right thing to do - remove the non-printable characters.

answered 02 Aug '17, 11:22

Guy%20Harris's gravatar image

Guy Harris ♦♦
accept rate: 19%

Specifically, it was this commit from Gerald that made all non-printable characters illegal, so no it's not a bug but intentional.

(02 Aug '17, 11:30) cmaynard ♦♦