Welcome to Geeklog, Anonymous Monday, May 12 2025 @ 05:52 pm EDT

Geeklog Forums

UTF-8 and strange characters in stories


Brian K

Anonymous
I am using geeklog 4.1
Stories with apostrophes show up with strange characters like this ( week’s) That is the word weeks. It does this only for anonymous users and the admin. My regular logged on user account shows them fine.

When I check the encoding on my browsers (any of them) it shows western iso-8859-1 for the accounts with the bad characters, but utf-8 for the ones with the right characters.

Does geeklog use different pages for logged on and users. header.thtml seems to be where I should add some text to tell all browsers to use utf-8, but that would not explain why it works for some users.

Any ideas where I need to make changes. It does it in professional and other themes.
 Quote

Brian K

Anonymous
Right after posting I found something that worked.

In config.php I changed these two entries:

$_CONF['language'] = 'english';
$_CONF['default_charset'] = 'utf-8';

To the following:

$_CONF['language'] = 'english_utf-8';
$_CONF['default_charset'] = 'utf-8';

Worked for my problem. Hope it helps others. LOL
 Quote

Brian K

Anonymous
On further examination that appears to have only solved the anonymous user issue. Admin still sees strange charters? Regular and annonymous users seem to work fine. Am I missing something?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
You admin account is probably still using the wrong version of the language file (non-UTF-8). Go to "My Account" and select the language again there.

bye, Dirk
 Quote

Tor

Anonymous
Stories with apostrophes show up with strange characters like this ( week’s) That is the word weeks. It does this only for anonymous users and the admin. My regular logged on user account shows them fine.

I changed the default language in the site configuration on the admin menu now it works fine (no coding)
 Quote

Tor

Anonymous
In the siteconfig.php I changed

$_CONF['default_charset'] = 'iso-8859-1'; to
$_CONF['default_charset'] = 'utf-8';

Fixed the problem straight away :banana: :banana:
 Quote

Tor

Anonymous
Then I had more problems so I changed

$_CONF['default_charset'] = 'utf-8'; to

$_CONF['default_charset'] = 'english_utf-8';

Now its working fine

:banana: :banana: :banana:
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: Tor

$_CONF['default_charset'] = 'english_utf-8';


Whatever that does (I'm not even sure what it would do), I'm pretty sure it won't do what you think it does. That config option is for a character set, not the name of a language file.

When you change that to 'utf-8', you should also switch the site's default language and the one under My Account: Select some other language, save the setting, then change it again to the language you actually want. That will ensure that it's using the proper language file for the character set. You didn't say which problem you saw, but it was probably related to that - using utf-8 but still using a non-utf language file.

bye, Dirk
 Quote

Tor

Anonymous
Yes you are right I had to change it back to just utf-8
 Quote

Tor

Anonymous
No there is still a problem when its english_utf-8 I get symbols insted of commers when its just utf-8 I get heaps of weird symbols all over the place Not sure what to do now.

 Quote

All times are EDT. The time is now 05:52 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content