mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-29 10:01:41 +00:00
gsmopen: choose codepage 65001 in windows, let's hope to have unicode in console
This commit is contained in:
parent
7a6a310727
commit
ea79dbb239
@ -1111,6 +1111,18 @@ static switch_status_t load_config(int reload_type)
|
|||||||
switch_xml_t cfg, xml, global_settings, param, interfaces, myinterface;
|
switch_xml_t cfg, xml, global_settings, param, interfaces, myinterface;
|
||||||
private_t *tech_pvt = NULL;
|
private_t *tech_pvt = NULL;
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
DEBUGA_GSMOPEN("Windows CODEPAGE Input =%d\n", GSMOPEN_P_LOG, GetConsoleCP());
|
||||||
|
SetConsoleCP(65001);
|
||||||
|
DEBUGA_GSMOPEN("Windows CODEPAGE Input =%d\n", GSMOPEN_P_LOG, GetConsoleCP());
|
||||||
|
DEBUGA_GSMOPEN("Windows CODEPAGE Output =%d\n", GSMOPEN_P_LOG, GetConsoleOutputCP());
|
||||||
|
SetConsoleOutputCP(65001);
|
||||||
|
DEBUGA_GSMOPEN("Windows CODEPAGE Output =%d\n", GSMOPEN_P_LOG, GetConsoleOutputCP());
|
||||||
|
DEBUGA_GSMOPEN("Windows CODEPAGE Output Test %s\n", GSMOPEN_P_LOG, "èéòàùç°§^£");
|
||||||
|
DEBUGA_GSMOPEN("Windows CODEPAGE Output Test %s\n", GSMOPEN_P_LOG, "Согласие» в различных регионах страны.");
|
||||||
|
//let's hope to have utf8 in console now, you need to use Lucida Console charset for the command prompt to show unicode
|
||||||
|
#endif// WIN32
|
||||||
|
|
||||||
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, gsmopen_module_pool);
|
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, gsmopen_module_pool);
|
||||||
if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
|
if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
|
||||||
ERRORA("open of %s failed\n", GSMOPEN_P_LOG, cf);
|
ERRORA("open of %s failed\n", GSMOPEN_P_LOG, cf);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user