bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#20707: [PROPOSED PATCH] Use curved quoting in C-generated errors


From: Eli Zaretskii
Subject: bug#20707: [PROPOSED PATCH] Use curved quoting in C-generated errors
Date: Mon, 01 Jun 2015 17:34:17 +0300

> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Mon,  1 Jun 2015 00:39:21 -0700
> Cc: Paul Eggert <eggert@cs.ucla.edu>
> 
> Quote with curved single quotes, ‘like this’, in diagnostics
> generated from C code.  This mostly uses C11-style UTF-8 strings,
> e.g., u8"quote ‘like this’", with a backward compatibility macro
> u8 for pre-C11 compilers.

Thanks.

I see a couple of potential issues with these changes:

  . They use UTF-8 encoded characters, and so will require a suitable
    'coding:' cookie in the affected files, or some equivalent setting
    (perhaps in .dir-locals.el?), otherwise they might not be decoded
    correctly in non-UTF-8 locales.  Doing so might remove at least
    part of the need for using the u8 qualifier, I think.

  . I think these strings will have to be decoded before they are
    passed to 'error', as we never pass any unibyte strings to Lisp
    interfaces without decoding them first.  (We never used before any
    non-ASCII characters in messages created by C sources, so this
    issue never arose until now.)  Doing so would also remove the need
    for using the u8 qualifier, I think.

  . 'error' calls 'verror', which calls 'make_string' to actually
    produce the message string.  However, 'make_string' is not
    reliable enough wrt whether it produces unibyte or multibyte
    strings, so I suggest to make sure we produce a multibyte string
    from these error messages.






reply via email to

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