MyBB Community Forums

Full Version: MyBB Character Encoding not working properly!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Alright, so once I updated the MyBB from 1.6 to 1.8 I've been having some issues with the character encoding.

Characters like öåä won't show up in attachments or .cfg that's being read by MyBB.

Example:
[Image: TRmZF8P.png]
 [Image: K9AFg2d.png]'


My Encoding settings:
[Image: dePYvYB.png]


$config['database']['encoding'] = 'utf8mb4';
whats your board url (Read the posting rules)
(2016-04-09, 10:32 AM)H2e Wrote: [ -> ]whats your board url (Read the posting rules)

Forum: https://frostzone.eu/forum

Click on Login and you will see the problem I'm having.
[Image: LDJhnCY.png]
It has nothing to do with database because the things that have wrong encoding are language strings. E.g. forum descriptions saved to the DB are ok. Check your inc/languages/swedish.php (or whatever it's called) file for $langinfo['charset'].
(2016-04-09, 02:32 PM)Destroy666 Wrote: [ -> ]It has nothing to do with database because the things that have wrong encoding are language strings. E.g. forum descriptions saved to the DB are ok. Check your inc/languages/swedish.php (or whatever it's called) file for $langinfo['charset'].

There is no Swedish langugae for 1.8 so I'm using English Toungue


This is what I got, should I change something?
/var/www/forum/inc/languages/english.php
<?php
/**
 * MyBB 1.8 English Language Pack
 * Copyright 2014 MyBB Group, All Rights Reserved
 *
 */

// The friendly name of the language
$langinfo['name'] = "English (American)";

// The author of the language
$langinfo['author'] = "MyBB Group";

// The language authors website
$langinfo['website'] = "http://www.mybb.com/";

// Compatible version of MyBB
$langinfo['version'] = "1807";

// Sets if the translation includes the Admin CP (1 = yes, 0 = no)
$langinfo['admin'] = 1;

// Sets if the language is RTL (Right to Left) (1 = yes, 0 = no)
$langinfo['rtl'] = 0;

// Sets the lang in the <html> on all pages
$langinfo['htmllang'] = "en";

// Sets the character set, blank uses the default.
$langinfo['charset'] = "UTF-8";
Try $langinfo['charset'] = "ISO-8859-1";
(2016-04-10, 05:01 PM)Destroy666 Wrote: [ -> ]Try $langinfo['charset'] = "ISO-8859-1";

Now the site is even more messed up.

http://i.imgur.com/uCA0VE8.png
Maybe it is a problem with database charset.

Did you edit forum with Notepad++ or other editor?

If you use Notepad++ you have to use always UTF-8 (without BOM)
(2016-04-10, 06:42 PM)mrkiller2010 Wrote: [ -> ]
(2016-04-10, 05:01 PM)Destroy666 Wrote: [ -> ]Try $langinfo['charset'] = "ISO-8859-1";

Now the site is even more messed up.

http://i.imgur.com/uCA0VE8.png

Revert and check how these characters look when you edit the header_welcomeblock_guest template, if they're there.
(2016-04-10, 06:54 PM)niere8 Wrote: [ -> ]Maybe it is a problem with database charset.

Did you edit forum with Notepad++ or other editor?

If you use Notepad++ you have to use always UTF-8 (without BOM)

(2016-04-10, 07:26 PM)Destroy666 Wrote: [ -> ]
(2016-04-10, 06:42 PM)mrkiller2010 Wrote: [ -> ]
(2016-04-10, 05:01 PM)Destroy666 Wrote: [ -> ]Try $langinfo['charset'] = "ISO-8859-1";

Now the site is even more messed up.

http://i.imgur.com/uCA0VE8.png

Revert and check how these characters look when you edit the header_welcomeblock_guest template, if they're there.

Still not working properly!