File: utf-8-init

package info (click to toggle)
espeak 1.48.15%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,448 kB
  • sloc: cpp: 32,061; ansic: 598; makefile: 267
file content (22 lines) | stat: -rw-r--r-- 628 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
C.UTF-8 is a known UTF-8 locale on Debian

--- a/src/speak.cpp
+++ b/src/speak.cpp
@@ -427,6 +427,7 @@ static int initialise(void)
 #else
 	if(setlocale(LC_CTYPE,"en_US.UTF-8") == NULL)
 	{
+		if(setlocale(LC_CTYPE,"C.UTF-8") == NULL)
 		if(setlocale(LC_CTYPE,"UTF-8") == NULL)
 			setlocale(LC_CTYPE,"");
 	}
--- a/src/speak_lib.cpp
+++ b/src/speak_lib.cpp
@@ -780,6 +780,7 @@ ENTER("espeak_Initialize");
 #else
 	if(setlocale(LC_CTYPE,"C.UTF-8") == NULL)
 	{
+		if(setlocale(LC_CTYPE,"C.UTF-8") == NULL)
 		if(setlocale(LC_CTYPE,"UTF-8") == NULL)
 			if(setlocale(LC_CTYPE,"en_US.UTF-8") == NULL)
 				setlocale(LC_CTYPE,"");