The espeak-ng path should be UTF-8 encoded for Unicode paths. #11392
Labels
component/speech-synth-drivers
good first issue
github features these at https://github.com/nvaccess/nvda/contribute
maintenance/dependencyUpdate
Maintenance of NVDA, specifically dependency updates.
p3
https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority
quick fix
triaged
Has been triaged, issue is waiting for implementation.
The path passed to espeak/espeak-ng in the initialization function should be UTF-8 encoded. This relates to the Unicode path part of #10607.
Specifically, espeak and espeak-ng use the Microsoft CRT stat implementation in the GetFileLength function (used to check if the path exists and is a directory). The documentation for stat [1] states:
In the initialization of the library version of espeak and espeak-ng, it is using setlocale with the following LC_CTYPE values --
"C.UTF-8"
,"UTF-8"
,"en_US.UTF-8"
, and""
. As such, the stat call will be expecting the path string to be a UTF-8 string; if it is not, then the initialization call will fail.This logic has not changed between espeak and espeak-ng.
[1] https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/stat-functions?view=vs-2019
The text was updated successfully, but these errors were encountered: