From: Junio C Hamano Date: Fri, 15 Jan 2021 19:58:02 GMT Subject: Re: [PATCH 09/11] GETTEXT_POISON=rot13: do compare the output in `test_i18ncmp` Message-ID: In-Reply-To: Johannes Schindelin writes: > On Tue, 12 Jan 2021, Junio C Hamano wrote: > >> > +static size_t unrot13(char *buf) >> > +{ >> > + char *p = buf, *q = buf; >> > + >> > + while (*p) { >> > + const char *begin = strstr(p, ""), *end; >> >> AFAIR from my reading of [02/11], the encoding side did not special >> case the payload that has or ; if we want to make it >> reversible conversion (which is excellent improvement over the >> current "# GETTEXT_POISON #" obfuscation), we'd need to do something >> about it, I think. > > Do you expect any message to be translated _twice_? Not at all. But what I had in mind, when I wrote the above, was that the programmers are entitled to expect that they are allowed to say: die(_("message with , and in it")); This will be rot13'd, and the entire thing will be enclosed inside "..."; I would expect that somewhere inside "..." the receiving end that attempts to parse it by relying on these markers will be confused. >> But on second thought, nobody can prevent a caller to die(_("%s", msg)); >> to have "" in the msg part, so perhaps punting like this >> series does is sufficient. I dunno. And this comment still stands.