Skip to content
Prev 59692 / 63433 Next

NEWS item for bugfix in normalizePath and file.exists?

On 4/28/21 6:20 PM, Toby Hocking wrote:
Once we have UTF-8 as native encoding on Windows, things like this 
should work reliably. It should be already the case with the 
experimental UCRT builds.

Even in the MSVCRT/official builds, in some cases things like this could 
work on Windows, depending on whether they trigger translation to native 
encoding or not. E.g. readLines() with encoding="UTF-8" argument would 
produce strings flagged as UTF-8, so indeed ones that could be 
translated to UTF-16LE if they are valid. Some file operations on 
Windows work with UTF-8 pathnames avoiding translation to native 
encoding, but not all, and instead of investing effort into fixing more 
we should I think instead invest into switching to UTF-8 as native encoding.

Actually, by using Emoji's you may also trigger bugs when supplementary 
characters are not supported on Windows. This is something that is still 
relevant after the switch to UTF-8 as native encoding, so something that 
needs to be fixed fully, and there have been some improvements recently.

Tomas