Improve the method of localizing column names and other fixed strings in
psql's \d commands and other uses of printQuery(). Previously we would pass these strings through gettext() and then send them to the server as literals in the SQL query. But the code was not set up to handle doubling of quotes in the strings, causing failure if a translation attempted to use the wrong kind of quote marks, as indeed is now the case for (at least) the French translation of \dFp. Another hazard was that gettext() would translate to whatever encoding was implied by the client's LC_CTYPE setting, which might be different from the client_encoding setting, which would probably cause the server to reject the query as mis-encoded. The new arrangement is to send the untranslated ASCII strings to the server, and do the translations inside printQuery() after the query results come back. Per report from Guillaume Lelarge and subsequent discussion.
Showing
想要评论请 注册 或 登录