[3264] in BarnOwl Developers
Re: [PATCH] send_zephyr: Set z_charset = ZCHARSET_UTF_8
daemon@ATHENA.MIT.EDU (David Benjamin)
Mon Apr 23 00:16:41 2012
In-Reply-To: <alpine.DEB.2.00.1204221929060.25205@dr-wily.mit.edu>
From: David Benjamin <davidben@MIT.EDU>
Date: Mon, 23 Apr 2012 00:16:16 -0400
To: Anders Kaseorg <andersk@mit.edu>
Cc: barnowl-dev@mit.edu
LGTM.
On Sun, Apr 22, 2012 at 7:29 PM, Anders Kaseorg <andersk@mit.edu> wrote:
> This allows X11 zwgc to display BarnOwl=92s UTF-8 messages correctly,
> since it doesn=92t yet autodetect character sets of ZCHARSET_UNKNOWN
> messages (http://zephyr.1ts.org/ticket/75).
>
> Signed-off-by: Anders Kaseorg <andersk@mit.edu>
> ---
> =A0zephyr.c | =A0 =A03 +++
> =A01 file changed, 3 insertions(+)
>
> diff --git a/zephyr.c b/zephyr.c
> index 1b60491..8cc367e 100644
> --- a/zephyr.c
> +++ b/zephyr.c
> @@ -715,6 +715,9 @@ int send_zephyr(const char *opcode, const char *zsig,=
const char *class, const c
>
> =A0 notice.z_kind=3DACKED;
> =A0 notice.z_port=3D0;
> +#ifdef ZCHARSET_UTF_8
> + =A0notice.z_charset =3D ZCHARSET_UTF_8;
> +#endif
> =A0 notice.z_class=3Dzstr(class);
> =A0 notice.z_class_inst=3Dzstr(instance);
> =A0 if (!strcmp(recipient, "@")) {
> --
> 1.7.10
>