Breaking: #105695 - Simplified CharsetConverter
See forge#105695
Description
The following methods have been removed:
TYPO3\
CMS\ Core\ Charset\ Charset Converter->conv () TYPO3\
CMS\ Core\ Charset\ Charset Converter->utf8_ encode () TYPO3\
CMS\ Core\ Charset\ Charset Converter->utf8_ decode () TYPO3\
, useCMS\ Core\ Charset\ Charset Converter->spec Chars To ASCII () TYPO3\
insteadCMS\ Core\ Charset\ Charset Converter->utf8_ char_ mapping () TYPO3\
CMS\ Core\ Charset\ Charset Converter->sb_ char_ mapping () TYPO3\
CMS\ Core\ Charset\ Charset Converter->euc_ char_ mapping ()
This removes most helper methods that implemented conversions between different charsets from the core codebase: The vast majority of web sites is based on utf-8 nowadays and needs no expensive conversion provided as core framework functionality anymore.
Impact
Calling one of the above methods will raise fatal PHP errors.
Affected installations
The core does not surface any of this removed low level functionality in upper
layers like TypoScript for a while already. The removed methods should have little
to no impact to casual instances. The only use cases that may be affected are
probably import and export extensions that had to convert between nowadays rather
obscure character sets like those of the EUC family. Affected extensions could
mitigate the removal by copying the TYPO3 v13 version of class
Charset
including affected files from core/
to
their own codebase. The extension scanner will find usages and classify as weak match.
Migration
Avoid calling above methods. Extensions that still need above functionality should copy consumed functionality to their own codebase, or use some third party library.
This detail has a direct substitution:
// Before
$charsetConverter->specCharsToASCII('utf-8', $myString);
// After
$charsetConverter->utf8_char_mapping($myString);