bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

POSIX gettext with option -s: handling of \c escape sequence


From: Bruno Haible
Subject: POSIX gettext with option -s: handling of \c escape sequence
Date: Thu, 12 May 2022 01:30:51 +0200

https://posix.rhansen.org/p/gettext_draft
Lines 699, 721

"if the -n option is not specified, a <newline> shall be written after the
 last message string"
"(if -n is not also specified) append a <newline> to the output."

This is NOT entirely how the gettext program from GNU gettext behaves. Namely,
it also looks whether some of the strings contain a '\c' sequence, in order to
emulate what BSD 'echo' does:

$ gettext -s -e 'ab\c' | od -t c
0000000   a   b
0000002

Whereas on Solaris, \c is not interpreted:

$ gettext -s -e 'ab\c' | od -t c
0000000   a   b   c  \n
0000004

How to resolve this?






reply via email to

[Prev in Thread] Current Thread [Next in Thread]