[TYPO3-dev] Importing content using TCEMain -Text encoding
Patrick Schriner
patrick.schriner at diemedialen.de
Thu Aug 28 11:01:50 CEST 2014
On Wed, 27 Aug 2014 08:03:31 +0200, Andreas Fernandez
<andreas.fernandez at aspedia.de> wrote:
> Hi,
>
> either
>
>> $text = utf8_encode('Prozess- übersicht');
> or
>> $text = utf8_decode('Prozess- übersicht');
>
> But usually, this is not required. Please check the collation of the
> "pages" table, it should be "utf8_general_ci".
As a side note, if you want to do yourself a favor use "utf8_unicode_ci"
(small performance hit for proper sorting).
http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
>
> Andreas
>
> Am 27.08.2014 07:15, schrieb Satish Maurya:
>> Thanks Andreas on reply.
>>
>> I want to write but not sure where/what should I write the code . do you
>> have any idea could you please suggest any single line code.
>>
>> Thanks
>>
>>
>> On Tue, Aug 26, 2014 at 7:54 PM, Andreas Fernandez <
>> andreas.fernandez at aspedia.de> wrote:
>>
>>> Hi,
>>>
>>> I don't know if there is "a TYPO3 way" but did you try to
>>> utf8_(de|en)code
>>> the $text?
>>>
>>> Mit freundlichen Grüßen,
>>> --
>>> Andreas Fernandez
>>>
>>> Am 26.08.2014 16:18, schrieb Satish Maurya:
>>>
>>> Hello,
>>>> I am trying to import bulk data from external database to TYPO3 6.1
>>>> database using below script.
>>>> //------------------
>>>> <?php
>>>> define('TYPO3_PROCEED_IF_NO_USER', 1);
>>>> require 'init.php';
>>>>
>>>> $text = 'Prozess- übersicht';
>>>> $data['pages']['NEW9823be87'] = array(
>>>> 'title' => $text,
>>>> 'subtitle' => 'Other title stuff',
>>>> 'hidden' => '0',
>>>> 'pid' => '-20'
>>>> );
>>>>
>>>> $tce =
>>>> \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\
>>>> DataHandling\\DataHandler');
>>>> $tce->stripslashes_values = 0;
>>>> $tce->start($data, array());
>>>> $tce->process_datamap();
>>>> ?>
>>>> //-------------------------
>>>>
>>>> It gets added but page title gets converted in question mark in
>>>> place of
>>>> German text.
>>>> Text converts to " Prozess- ?bersicht"
>>>>
>>>> Could you please suggest any solution on this.
>>>>
>>>> Thanks
>>>> _______________________________________________
>>>> TYPO3-dev mailing list
>>>> TYPO3-dev at lists.typo3.org
>>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>>>>
>>> _______________________________________________
>>> TYPO3-dev mailing list
>>> TYPO3-dev at lists.typo3.org
>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>>
>>
>>
>
--
Patrick Schriner
More information about the TYPO3-dev
mailing list