get locale stuff more correct

Originally committed to SVN as r983.
This commit is contained in:
David Lamparter 2007-04-03 04:34:56 +00:00
parent 246be56350
commit 91c11fbf09
2 changed files with 17 additions and 2 deletions

View File

@ -77,6 +77,17 @@
FrameMain::FrameMain (wxArrayString args)
: wxFrame ((wxFrame*)NULL,-1,_T(""),wxDefaultPosition,wxSize(800,600),wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN)
{
#ifdef __WXGTK__
/* XXX HACK XXX
* Gtk just got initialized. And if we're using the SCIM IME,
* it just did a setlocale(LC_ALL, ""). so, BOOM. "§!$)(!"§$.
*/
setlocale(LC_ALL, "");
setlocale(LC_CTYPE, "C");
setlocale(LC_NUMERIC, "C");
/* XXX HACK XXX */
#endif
// Set application's frame
AegisubApp::Get()->frame = this;

View File

@ -73,6 +73,10 @@ bool AegisubApp::OnInit() {
// Initialize randomizer
srand(time(NULL));
// locale for loading options
setlocale(LC_NUMERIC, "C");
setlocale(LC_CTYPE, "C");
// App name
SetAppName(_T("Aegisub"));
#ifndef _DEBUG
@ -100,7 +104,7 @@ bool AegisubApp::OnInit() {
}
locale.Init(lang);
#else
locale.Init(wxLocale::GetSystemLanguage());
locale.Init(wxLANGUAGE_DEFAULT);
#endif
// Load Automation scripts