Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: swo0p on September 21, 2021, 02:36:00 PM

Title: Blank first page next case
Post by: swo0p on September 21, 2021, 02:36:00 PM
Hi there,

I have no idea what next i should do. I am using polish language of the forum and Its looks like:

1. when i set up encoding to UTF-8 with polish language, everything works ok except first page - blank
2. when I set up english language: all the pages works ok but i would like to use polish language
3. when I was changing encoding in file index.polish-utf8.php from UTF-8 to ISO-8859-2 everything works and first page also but can't save any posts because

Incorrect string value: '\xB3 test...' for column `mierzejewski_tkpforum2`.`smf_messages`.`subject` at row 1
File: /forum/Sources/Subs-Post.php
Line: 1839

and this code is:
// Insert the post.
$smcFunc['db_insert']('',
'{db_prefix}messages',
array(
'id_board' => 'int', 'id_topic' => 'int', 'id_member' => 'int', 'subject' => 'string-255', 'body' => (!empty($modSettings['max_messageLength']) && $modSettings['max_messageLength'] > 65534 ? 'string-' . $modSettings['max_messageLength'] : 'string-65534'),
'poster_name' => 'string-255', 'poster_email' => 'string-255', 'poster_time' => 'int', 'poster_ip' => 'string-255',
'smileys_enabled' => 'int', 'modified_name' => 'string', 'icon' => 'string-16', 'approved' => 'int',
),
array(
$topicOptions['board'], $topicOptions['id'], $posterOptions['id'], $msgOptions['subject'], $msgOptions['body'],
$posterOptions['name'], $posterOptions['email'], time(), $posterOptions['ip'],
$msgOptions['smileys_enabled'] ? 1 : 0, '', $msgOptions['icon'], $msgOptions['approved'],
),
array('id_msg')
);
$msgOptions['id'] = $smcFunc['db_insert_id']('{db_prefix}messages', 'id_msg');

line 1839: array('id_msg')

Script: 2.0.18
PHP: 7.3
DB: 10.5.10-MariaDB
DB encoding: utf8_general_ci

Someone can help me with this?
Title: Re: Blank first page next case
Post by: Steve on September 26, 2021, 10:52:23 AM
Bumping this as it's been five days since you posted. Hopefully someone with more knowledge in this area than I will respond soon.
Title: Re: Blank first page next case
Post by: Aleksi "Lex" Kilpinen on September 26, 2021, 10:57:33 AM
How exactly did you "set up encoding to utf-8"?
Quote from: swo0p on September 21, 2021, 02:36:00 PM3. when I was changing encoding in file index.polish-utf8.php from UTF-8 to ISO-8859-2 everything works and first page also but can't save any posts because
This is usually not the way to go, there is a reason there are separate settings for this and language packs saved in the correct encoding available.