Previous Thread
Next Thread
Print Thread
Rate Thread
#323716 12/28/2025 7:10 PM
Joined: Jun 2017
Posts: 15
Newbie
Newbie
Offline
Joined: Jun 2017
Posts: 15
We run the content rebuild procedures each month. When they are run, they cause a massive corruption of data. (3452 instances in post bodies.) Both emojis and puncuation (', ", ;, :, etc.) are corrupted. For example:
Quote
3491 58 1 ton Napco 59 1/2 ton Napco 58 1/2 ton Napco 55 1 ton 9’ bed 58 3/4 ton stepside 55 LCF boom truck (3) 57 2 tons
4290 1956 Chevy 3600 “Maynard” In the DITY Gallery More pictures on Flickr
5319 Blue 50 1950 3100 w/57 235 Patrick’s Saginaw 4 speed and 3:55 rear end
6590 •1951 GMC 250 in the Project Journals •1948 Chevrolet 6400 - Detroit Diesel 4-53T - Roadranger 10 speed overdrive - 4 wheel disc brakes •1952 Chevrolet 3800 pickup ---All pictures--- "First, get a clear notion of what you desire to accomplish, and then in all probability you will succeed in doing it..." -Henry Maudslay-
46192 Larry Old man…Old truck…neither one goes very fast. All you need in life is TIME, PATIENCE and MONEY. If you are missing one component, you'll need an abundance of the others two.
34708 1954 3100 with Hydra-Matic Currently undergoing S10 conversion Parkinson’s...it’s not just for the elderly Caution, slow man at work
36470 RW “Do what I do. Hold tight and pretend it’s a plan!” ~ Dr. Who ~
39231 '59 Apache ‘21 Beta 390RS ‘18 BMW R1200RT '12 Ford Flex '13 Aprilia Tuono ‘11 Ducati Hypermotard Salisbury, MD
And
Quote
Seems we only get to work on this project every now and again᠁<br> But so it goes with projects..🤷‍♂️<br>Anyhow, freed up stuck oil pump from our 302 that had been sittin for a number of years.<br><br>Got a replacement camshaft and went press gear off of old cam and broke the gear. <br><br>Didn’t realize it was aluminum, seemed like removing it on a shop press was the best method,,,, not so much. <br><br>Casting # is 2194906<br>Looking online for another cam gear and not finding any I feel are the exact same ?<br>Any suggestions ?<br>Brian 302 cam gear
I will post pics of each transfer case when we rebuild them. I posted the question about why the rebuild manual stated don't remove the speedometer gear and inner bearing from the shaft unless necessary. I would think on a rebuild you would want to replace all the bearings. Possibly concerned about damaging the speedometer gear? I the the manual only shows a spacer or is it a crush sleeve, what a mystery🤔. Will find out. Re: Identifying this NAPCO transfer case
Gears 51 / WICruiser,<br><br>Thanks for the info. I like having options and y'all just gave me a couple of them.🤔<br><br>Deegs Re: Wiring harness replacement - what do I need ('53 3100)
Ohhhhahahhahahahahahahahahahahash Coilover that is awesome! 👏. That makes me feel better when i call myself a hack on something i do that dosent even matter. Re: Why, oh why do people do this? Hack job pics.
Well there is a first 😳µâ€ðŸ’«😳µâ€ðŸ’«😳µâ€ðŸ’«😳µâ€ðŸ’«😳µâ€ðŸ’« Re: Welded Harmonic Balancer on 230
I like it👌🏴‍☠️
We have our database set to use UTF8:
Code
mysql> SHOW VARIABLES LIKE 'character_set_database';
+------------------------+---------+
| Variable_name          | Value   |
+------------------------+---------+
| character_set_database | utf8mb4 |
+------------------------+---------+
But the corruption occurs consistently whenever we run the rebuild processes. After I run the rebuild processes, I run queries to find out if there is corruption. (There always is.)
Code
select POST_BODY from sbf_POSTS where POST_BODY like '%â€%'
I then run this query that cleans them up.
Code
UPDATE sbf_POSTS
SET POST_BODY = REPLACE
                                  (REPLACE
                                      (REPLACE
                                          (REPLACE
                                              (REPLACE
                                                  (REPLACE
                                                      (REPLACE
                                                           (REPLACE
                              (POST_BODY, '“' , '“'), 
                                  '”','”'), 
                                       '‘','‘'), 
                                           '’', '’'), 
                                                '—', '–'), 
                                                    '–', '—'),
                                                        '…', '᠁'),
                                                             '•', '•')
WHERE ( 
    POST_BODY LIKE '%“%' OR
    POST_BODY LIKE '%”%' OR
    POST_BODY LIKE '%‘%' OR
    POST_BODY LIKE '%’%' OR
    POST_BODY LIKE '%—%' OR
    POST_BODY LIKE '%–%' OR
    POST_BODY LIKE '%…%' OR
    POST_BODY LIKE '%•%'
)
Emojis are a whole nother kettle of fish. This finds them:
Code
select POST_BODY, POST_SUBJECT  from sbf_POSTS where POST_BODY like '%ðŸ%'
But cleaning them up takes knowing what each one is. I haven't worked on this for a while, and I discovered after writing these queries that some emojis are a combination of several emojis. So, my queries sometimes replace a part of an emoji rather than the whole thing.
Code
UPDATE sbf_POSTS 
SET POST_BODY = REPLACE
                                  (REPLACE
                                      (REPLACE
                                          (REPLACE
                                              (REPLACE
                                                  (REPLACE
                                                      (REPLACE
                                                          (REPLACE
                               (REPLACE
                                   (REPLACE
                                       (REPLACE
                                           (REPLACE
                                               (REPLACE
                                                   (REPLACE
                                                       (REPLACE
                                                           (REPLACE
                              (POST_BODY, '👍', '👍'),
                                  '🇺🇸' , '🇺🇸'),
                                       '😎','😎'), 
                                           '😬', '😜'), 
                                                '🥴', '🦊'), 
                                                    'ðŸ™', '🖐🏼'),
                                                        '🙂', '😂'),
                                                            '🧐Yo', '🧐'),
                              '🤔?', '🤨'),
                                  '😂', ' 😂'),
                                      '🔚', '🔦'),
                                          '😉', '😊'),
                                              '😁', '😁'),
                                                  'ðŸ›', ''),
                                                      '🏻', '🏴‍☠️'),
                                                         '🤷🏼‍♂ï¸', '🧑🏾‍🦱')
WHERE ( 
    POST_BODY LIKE '%👍%' OR
    POST_BODY LIKE '%🇺ðŸ‡%' OR
    POST_BODY LIKE '%😎%' OR
    POST_BODY LIKE '%😬%' OR
    POST_BODY LIKE '%🥴%' OR
    POST_BODY LIKE '%ðŸ™\', %' OR
    POST_BODY LIKE '%ðŸ™%' OR
    POST_BODY LIKE '%🧐Yo%' OR
    POST_BODY LIKE '%🤔?%' OR
    POST_BODY LIKE '%😂%' OR
    POST_BODY LIKE '%🔚%' OR
    POST_BODY LIKE '%😉%' OR
    POST_BODY LIKE '%😁%' OR
    POST_BODY LIKE '%ðŸ›%' OR
    POST_BODY LIKE '%🏻%' OR
    POST_BODY LIKE '%🤷🏼‍♂ï¸%'
)
And I have a second query that catches more of them

Are there any plans to make rebuilds fully UTF-8 safe?


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 8.0.0
Release 20240826
Server OS Linux
Server Load 0.11
Web Server Apache/2.4.37
PHP Version 8.3.11
MYSQL Version 8.0.39
Database Size 1.94 GB
Sponsored Links
Joined: Jul 2001
Posts: 1,153
Likes: 83
coffee and code
coffee and code
Joined: Jul 2001
Posts: 1,153
Likes: 83
Just because you've converted your database storage engine to UTF-8 doesnt mean that the newly added data within it is being stored as UTF-8, or the previous data in it was converted to UTF-8 before you've changed to the collation.

This has been discussed in great detail on UBBCentral. You need to configure your older forums & database together properly to handle UTF-8. New installs of UBB.threads with their default collation will not have the mismatched character sets you are having.

additional reading and links
https://www.ubbcentral.com/forums/u...an-we-finally-switch-to-utf-8#Post255103
and here
https://www.ubbcentral.com/forums/u...ging-from-iso-8859-1-to-utf-8#Post263056


current developer of UBB.threads php forum software
current release: UBB.threads 8.0.0 // wip: UBB.threads 8.0.1
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Jun 2017
Posts: 15
Newbie
Newbie
Offline
Joined: Jun 2017
Posts: 15
The database is set to utf8mb4. The charset in generic.php is set to utf8. The only time this problem occurs is when I run the rebuild scripts.
Quote
Just because you've converted your database storage engine to UTF-8 doesnt mean that the newly added data within it is being stored as UTF-8, or the previous data in it was converted to UTF-8 before you've changed to the collation.
What does this mean? If the database storage engine is set to utf8, why would newly added data within it be stored in some other charset?

Everything works and looks fine UNTIL I run rebuild. And it's easily fixed with a query. After it's fixed, it remains fixed until I run rebuild again. Do you really think rebuild is not the problem?


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 8.0.0
Release 20240826
Server OS Linux
Server Load 0.11
Web Server Apache/2.4.37
PHP Version 8.3.11
MYSQL Version 8.0.39
Database Size 1.94 GB
Joined: Jul 2001
Posts: 1,153
Likes: 83
coffee and code
coffee and code
Joined: Jul 2001
Posts: 1,153
Likes: 83
Originally Posted by stoveboltgeek
What does this mean? If the database storage engine is set to utf8, why would newly added data within it be stored in some other charset?

Your HTML header should be set to UTF-8 so the new data would also be stored in that format
<meta charset="utf-8">
https://www.w3.org/International/questions/qa-html-encoding-declarations

Originally Posted by stoveboltgeek
Everything works and looks fine UNTIL I run rebuild. And it's easily fixed with a query. After it's fixed, it remains fixed until I run rebuild again. Do you really think rebuild is not the problem?

PHP's default character should be set to UTF-8
default_charset = "UTF-8"
https://php.net/default-charset

Database collation should be set to utf8mb4_general_ci

Your database table collation should also be set to utf8mb4_general_ci
/forums/admin/dbinfo.php

Also, Control Panel > Paths & Database: Database
"MySQL Full Unicode Support (utf8mb4)" should be checked

Quote
MySQL by default only uses a three-byte encoding and so values in the four-byte range (e.g. Asian characters and Emojis) cannot be stored. Any attempt to enter a text that contains four-byte characters will result in those characters being returned as errors. MySQL does provide full four-byte UTF-8 support, but it requires certain database settings to be configured. Converting to utf8mb4_unicode_ci is preferred. 4-Byte UTF-8 Unicode requires MySQL 5.5.3 or above.

Additional reading here
https://www.w3.org/International/techniques/server-setup


current developer of UBB.threads php forum software
current release: UBB.threads 8.0.0 // wip: UBB.threads 8.0.1
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Jun 2017
Posts: 15
Newbie
Newbie
Offline
Joined: Jun 2017
Posts: 15
]# grep default_charset /etc/opt/remi/php83/php.ini
default_charset = "UTF-8"


mysql> SHOW VARIABLES LIKE 'character_set_client';
+----------------------+---------+
| Variable_name | Value |
+----------------------+---------+
| character_set_client | utf8mb4 |
+----------------------+---------+
1 row in set (0.00 sec)

mysql> SHOW VARIABLES LIKE 'character_set_connection';
+--------------------------+---------+
| Variable_name | Value |
+--------------------------+---------+
| character_set_connection | utf8mb4 |
+--------------------------+---------+
1 row in set (0.00 sec)


mysql> SHOW TABLE STATUS LIKE 'sbf_POSTS';
+-----------+--------+---------+------------+---------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+---------------------+--------------------+----------+----------------+---------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
+-----------+--------+---------+------------+---------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+---------------------+--------------------+----------+----------------+---------+
| sbf_POSTS | MyISAM | 10 | Dynamic | 1043638 | 863 | 901309848 | 281474976710655 | 699795456 | 23928 | 1594913 | 2024-06-13 23:53:41 | 2025-12-28 16:00:35 | 2024-06-09 11:58:58 | utf8mb4_general_ci | NULL | | |
+-----------+--------+---------+------------+---------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+---------------------+---------------------+--------------------+----------+----------------+---------+
1 row in set (0.00 sec)

[Linked Image from stovebolt.com]


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 8.0.0
Release 20240826
Server OS Linux
Server Load 0.11
Web Server Apache/2.4.37
PHP Version 8.3.11
MYSQL Version 8.0.39
Database Size 1.94 GB
Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Ruben Rocha
Ruben Rocha
Lutz,FL,USA
Posts: 253
Joined: January 2000
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 3447
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 20
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)