Fix #111379: Allow Win32 Volume Names to Contain Characters > U+FFFF

When processing volume names for the File Browser sidebar lists we are
properly handling Windows "wide" characters (UTF-16) as long as they
are single wide characters, so below U+FFFF. For characters above this
value we get a pair of UTF-16, and end up trying to convert each to
UTF-8 as separate UTF-32 values. The result is blank output and a
console error that "surrogates not allowed." This PR just does this
conversion correctly using utfconv.

Pull Request: https://projects.blender.org/blender/blender/pulls/131763
This commit is contained in:
Harley Acheson
2024-12-12 00:49:33 +01:00
committed by Harley Acheson
parent 3bbf546d28
commit fe6609c4eb
3 changed files with 10 additions and 6 deletions

View File

@@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(INC
.
PUBLIC .
)
set(INC_SYS
@@ -30,3 +30,4 @@ if(WIN32)
endif()
blender_add_lib(bf_intern_utfconv "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
add_library(bf::intern::utfconv ALIAS bf_intern_utfconv)