Hi Tony, 2018/10/8 Mon 11:32:39 UTC+9 Tony Mechelynck wrote: > On Mon, Oct 8, 2018 at 3:50 AM Ken Takata <ktakata65...@gmail.com> wrote: > > [...] > > I have updated the patch for 8.1.0453: > > > > * Fixed conflicts. > > * Fixed a typo in a comment which was added in 8.1.0453. > > > > Regards, > > Ken Takata > > In UTF-8, characters outside the BMP (i.e. characters in the range > U+10000 to U+10FFFD), including some "CJK Extension" characters in > plane 2, use 4 bytes each, not 3. However, in UTF-16le as used by > Windows, each of those non-BMP characters takes up 2 words (one high > surrogate and one low surrogate) instead of 1, so maybe (I don't know) > they might "count double" towards the allowed _MAX_PATH characters.
Of course, the buffer size "_MAX_PATH * 3" takes in to account those non-BMP characters. A non-BMP character will be stored as two WCHARs which are 4 bytes in UTF-16. And if it is converted to UTF-8, it is also 4 bytes. So the buffer size is correct. No need to multiply by 4. Regards, Ken Takata -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.