diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/admin.pl | 7 | ||||
-rwxr-xr-x | bin/am.pl | 1 | ||||
-rwxr-xr-x | bin/login.pl | 7 | ||||
-rwxr-xr-x | bin/oe.pl | 6 |
4 files changed, 15 insertions, 6 deletions
diff --git a/bin/admin.pl b/bin/admin.pl index deac8655..ce96cd6e 100755 --- a/bin/admin.pl +++ b/bin/admin.pl @@ -37,13 +37,16 @@ $menufile = "menu.ini"; use LedgerSMB::Form; +use LedgerSMB::Locale; use LedgerSMB::User; $form = new Form; -$locale = new Locale $language, "admin"; -$form->{charset} = $locale->{charset}; +$locale = LedgerSMB::Locale->get_handle($language); +$locale->encoding('UTF-8'); +$form->{charset} = 'UTF-8'; +#$form->{charset} = $locale->encoding; eval { require DBI; }; $form->error($locale->text('DBI not installed!')) if ($@); @@ -2050,7 +2050,6 @@ sub config { foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} } keys %countrycodes) { $countrycodes .= ($myconfig{countrycode} eq $key) ? "<option selected value=$key>$countrycodes{$key}\n" : "<option value=$key>$countrycodes{$key}\n"; } - $countrycodes = qq|<option value="">English\n$countrycodes|; opendir CSS, "css/."; @all = grep /.*\.css$/, readdir CSS; diff --git a/bin/login.pl b/bin/login.pl index fbfdf431..c52c3b9e 100755 --- a/bin/login.pl +++ b/bin/login.pl @@ -39,6 +39,7 @@ use DBI; use LedgerSMB::User; use LedgerSMB::Form; +use LedgerSMB::Locale; ## will need this later when session_destroy will be used #use LedgerSMB::Session; @@ -46,8 +47,10 @@ use LedgerSMB::Form; $form = new Form; -$locale = new Locale $language, "login"; -$form->{charset} = $locale->{charset}; +$locale = LedgerSMB::Locale->get_handle($language); +$locale->encoding('UTF-8'); +$form->{charset} = 'UTF-8'; +#$form->{charset} = $locale->encoding; # customization if (-f "bin/custom/$form->{script}") { @@ -45,6 +45,7 @@ use LedgerSMB::IR; use LedgerSMB::IS; use LedgerSMB::PE; use LedgerSMB::Tax; +use LedgerSMB::Locale; require "bin/arap.pl"; require "bin/io.pl"; @@ -1944,7 +1945,10 @@ sub invoice { $form->{type} = "invoice"; # locale messages - $locale = new Locale "$myconfig{countrycode}", "$script"; + $locale = LedgerSMB::Locale->get_handle($myconfig{countrycode}); + #$form->{charset} = $locale->encoding; + $form->{charset} = 'UTF-8'; + $locale->encoding('UTF-8'); require "bin/$form->{script}"; |