Subject: Re: bug#38287: 26.3.50; filenotify.el: the Chinese file name in the event is messy code

From: Eli Zaretskii <[email-masked]>
Date: Thu, 21 Nov 2019 16:42:41 +0200

> From: HaiJun Zhang <[email-masked]>
> CC: "[email-masked]" <[email-masked]>
> Date: Thu, 21 Nov 2019 02:33:42 +0000
> 
> It is fixed by your patch. Thanks. 

Thanks, I installed it.

> I print the value of file and encoded_file with safe_debug_print in kqueue.c. The former is normal string. The
> latter is messy code. What is the encoding of encoded_file? The value of file-name-coding-system is
> utf-8-hfs. How much does utf-8-hfs diff with utf-8-unix? Is utf-8-hfs not really utf-8?

encoded_file is in UTF-8 on your system.  What you perceive as "messy
code" is how Emacs displays unibyte strings, which are actually
sequences of raw bytes, not of characters.

utf-8 and utf-8-hfs are not exactly the same, but for Chinese
characters they produce the same results, because those characters
don't have decompositions.