-
-
Notifications
You must be signed in to change notification settings - Fork 784
The espeak-ng path should be UTF-8 encoded for Unicode paths. #11392
Copy link
Copy link
Closed as duplicate of#19582
Closed as duplicate of#19582
Copy link
Labels
component/speech-synth-driversgood first issuegithub features these at https://github.com/nvaccess/nvda/contributegithub features these at https://github.com/nvaccess/nvda/contributemaintenance/dependencyUpdateMaintenance of NVDA, specifically dependency updates.Maintenance of NVDA, specifically dependency updates.p3https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priorityhttps://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priorityquick fixtriagedHas been triaged, issue is waiting for implementation.Has been triaged, issue is waiting for implementation.
Metadata
Metadata
Assignees
Labels
component/speech-synth-driversgood first issuegithub features these at https://github.com/nvaccess/nvda/contributegithub features these at https://github.com/nvaccess/nvda/contributemaintenance/dependencyUpdateMaintenance of NVDA, specifically dependency updates.Maintenance of NVDA, specifically dependency updates.p3https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priorityhttps://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priorityquick fixtriagedHas been triaged, issue is waiting for implementation.Has been triaged, issue is waiting for implementation.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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