Skip to content
Snippets Groups Projects
Commit 6f97ebda authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

New kludge to access Locale.Charset.decoder().

Rev: lib/modules/Locale.pmod/module.pmod:1.24
parent 3abf3f60
No related branches found
No related tags found
No related merge requests found
...@@ -206,6 +206,10 @@ class LocaleObject ...@@ -206,6 +206,10 @@ class LocaleObject
} }
} }
// Used to delay lookup of the Charset module until run-time when dumped,
// and thus resolve the circularity.
static object(Locale) locale = Locale;
object get_object(string project, string lang) { object get_object(string project, string lang) {
// Is there such a project? // Is there such a project?
...@@ -279,7 +283,7 @@ object get_object(string project, string lang) { ...@@ -279,7 +283,7 @@ object get_object(string project, string lang) {
default: default:
object dec; object dec;
// FIXME: Is this the best way of using Locale.Charset.decoder ? // FIXME: Is this the best way of using Locale.Charset.decoder ?
if(catch(dec = .Charset.decoder(encoding))) { if(catch(dec = locale.Charset.decoder(encoding))) {
werror("\n* Warning: unknown encoding %O in %O\n", werror("\n* Warning: unknown encoding %O in %O\n",
encoding, filename); encoding, filename);
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment