Re: POSIX gettext with option -s: handling of \c escape sequence
Thanks for the reply. Geoff Clare wrote: > > 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 > > 000 a b > > 002 > > > > Whereas on Solaris, \c is not interpreted: > > > > $ gettext -s -e 'ab\c' | od -t c > > 000 a b c \n > > 004 > > > > How to resolve this? > > In today's call we made changes to allow this handling of \c (using "may", > so it is an implementation option). Please check the updated etherpad to > see if the way it is described there matches how GNU gettext behaves. The updated text is good. GNU gettext will need a small change, in order to accommodate the specified behaviour for the characters that follow '\c', but that is OK since it is rare for users to add more characters after '\c'. Bruno
Re: POSIX gettext with option -s: handling of \c escape sequence
Bruno Haible wrote, on 12 May 2022: > > https://posix.rhansen.org/p/gettext_draft > Lines 699, 721 > > "if the -n option is not specified, a shall be written after the > last message string" > "(if -n is not also specified) append a 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 > 000 a b > 002 > > Whereas on Solaris, \c is not interpreted: > > $ gettext -s -e 'ab\c' | od -t c > 000 a b c \n > 004 > > How to resolve this? In today's call we made changes to allow this handling of \c (using "may", so it is an implementation option). Please check the updated etherpad to see if the way it is described there matches how GNU gettext behaves. -- Geoff Clare The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England
POSIX gettext with option -s: handling of \c escape sequence
https://posix.rhansen.org/p/gettext_draft Lines 699, 721 "if the -n option is not specified, a shall be written after the last message string" "(if -n is not also specified) append a 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 000 a b 002 Whereas on Solaris, \c is not interpreted: $ gettext -s -e 'ab\c' | od -t c 000 a b c \n 004 How to resolve this?