Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
cec0a0fc
Commit
cec0a0fc
authored
Apr 27, 2004
by
moodler
Browse files
New developmental setting to force UTF for the whole server
Plus, some optimisation on the way encoding is stored (in the session).
parent
37aaf074
Changes
3
Hide whitespace changes
Inline
Side-by-side
config-dist.php
View file @
cec0a0fc
...
...
@@ -148,6 +148,11 @@ $CFG->admin = 'admin';
//
// Setting this to true will enable admins to edit any post at any time
// $CFG->admineditalways = true;
//
// This setting will put Moodle in Unicode mode. It's very new and
// most likely doesn't work yet. THIS IS FOR DEVELOPERS ONLY, IT IS
// NOT RECOMMENDED FOR PRODUCTION SITES
// $CFG->unicode = true;
...
...
lib/setup.php
View file @
cec0a0fc
...
...
@@ -219,6 +219,7 @@
if
(
isset
(
$_GET
[
'lang'
]))
{
$SESSION
->
lang
=
$lang
;
$SESSION
->
encoding
=
get_string
(
'thischarset'
);
}
if
(
empty
(
$CFG
->
lang
))
{
$CFG
->
lang
=
"en"
;
...
...
lib/weblib.php
View file @
cec0a0fc
...
...
@@ -375,7 +375,7 @@ function choose_from_menu ($options, $name, $selected="", $nothing="choose", $sc
$output
=
"<select name=
\"
$name
\"
$javascript
>
\n
"
;
if
(
$nothing
)
{
$output
.
=
" <option value=
\"
$nothingvalue
\"\n
"
;
if
(
$nothingvalue
==
$selected
)
{
if
(
$nothingvalue
==
=
$selected
)
{
$output
.
=
" selected=
\"
true
\"
"
;
}
$output
.
=
">
$nothing
</option>
\n
"
;
...
...
@@ -931,13 +931,15 @@ function print_header ($title="", $heading="", $navigation="", $focus="", $meta=
// Add a stylesheet for the HTML editor
$meta
=
"<style type=
\"
text/css
\"
>@import url(
$CFG->wwwroot
/lib/editor/htmlarea.css);</style>
\n
$meta
\n
"
;
// Specify character set ... default is iso-8859-1 but some languages might need something else
// Could be optimised by carrying the charset variable around in $USER
if
(
current_language
()
==
"en"
)
{
$meta
=
"<meta http-equiv=
\"
content-type
\"
content=
\"
text/html; charset=iso-8859-1
\"
/>
\n
$meta
\n
"
;
// Character set could be optimised by carrying the charset variable around in $USER
if
(
!
empty
(
$CFG
->
unicode
))
{
$encoding
=
"utf-8"
;
}
else
if
(
!
empty
(
$SESSION
->
encoding
))
{
$encoding
=
$SESSION
->
encoding
;
}
else
{
$
meta
=
"<meta http-equiv=
\"
content-type
\"
content=
\"
text/html; charset="
.
get_string
(
"thischarset"
)
.
"
\"
/>
\n
$meta
\n
"
;
$
encoding
=
get_string
(
"thischarset"
);
}
$meta
=
"<meta http-equiv=
\"
content-type
\"
content=
\"
text/html; charset=
$encoding
\"
/>
\n
$meta
\n
"
;
if
(
get_string
(
"thisdirection"
)
==
"rtl"
)
{
$direction
=
" dir=
\"
rtl
\"
"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment