diff --git src/wp-includes/wp-db.php src/wp-includes/wp-db.php
index 77b64da..b5e38c1 100644
--- src/wp-includes/wp-db.php
+++ src/wp-includes/wp-db.php
@@ -2637,6 +2637,7 @@ class wpdb {
 		 */
 		$charset = apply_filters( 'pre_get_table_charset', null, $table );
 		if ( null !== $charset ) {
+			$this->table_charset[ $tablekey ] = $charset;
 			return $charset;
 		}
 
diff --git tests/phpunit/tests/db/charset.php tests/phpunit/tests/db/charset.php
index e0f9df2..d54dd14 100644
--- tests/phpunit/tests/db/charset.php
+++ tests/phpunit/tests/db/charset.php
@@ -833,6 +833,33 @@ class Tests_DB_Charset extends WP_UnitTestCase {
 	}
 
 	/**
+	 * Tests if the column charset handles table charset changes with the `pre_get_table_charset` filter.
+	 *
+	 * @ticket 38921
+	 */
+	public function test_get_table_and_column_charset_with_pre_get_table_charset_filter() {
+		add_filter( 'pre_get_table_charset', array( $this, 'change_table_charset_callback' ), 10, 2 );
+		$table_charset = self::$_wpdb->get_table_charset( 'some_table' );
+		remove_filter( 'pre_get_table_charset', array( $this, 'change_table_charset_callback' ), 10, 2 );
+
+		$column_charset = self::$_wpdb->get_col_charset( 'some_table', 'some_column' );
+
+		$this->assertSame( 'fake_charset', $table_charset );
+		$this->assertSame( 'fake_charset', $column_charset );
+	}
+
+	/**
+	 * Callback for the `pre_get_table_charset` filter.
+	 *
+	 * @param string $charset  The table's character set.
+	 * @param string $table    The name of the table.
+	 * @return string $charset The table's character set.
+	 */
+	public function change_table_charset_callback( $charset, $table ) {
+		return 'fake_charset';
+	}
+
+	/**
 	 * @dataProvider data_test_get_column_charset
 	 * @ticket 33501
 	 */
