Project

General

Profile

Actions

Bug #16566

closed

external UTF-8 files parsed with INCLUDE_TYPOSCRIPT are not correctly handled

Added by Alban Cousinie about 18 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Miscellaneous
Target version:
-
Start date:
2006-09-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I wanted to store the translations of my templavoila templates' text items into external files, then load the translations from those external files using the INCLUDE_TYPOSCRIPT directive into my template's CONSTANTS section :

// Arabic language
[globalVar = GP:L = 3]
<INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/templates/deria-audio/translations/home_ar.txt">
[GLOBAL]

then in the SETUP section of the template, the siteMenuLabel value is inserted as defined in the text file :
lib.siteMenuLabel.value={$siteMenuLabel}

The value being defined inside the external text file as (utf-8 characters may not render correctly on the bugs.typo3.org page. The right value of this declaration is made of arabic characters):
siteMenuLabel_ar= (arabic signs here, see attached TXT file)

Unfortunately, the rendered template whould output the following garbage using the INCLUDE_TYPOSCRIPT method :
siteMenuLabel_ar}$}

If you define
siteMenuLabel= (arabic signs here, see attached TXT file)
straight in the CONSTANTS section of the template (thus no import from INCLUDE_TYPOSCRIPT) the arabic characters display correctly.

Of course I have tried with various UTF-8 compliant editors to edit the text file and none fixed the issue. While the arabic characters display correctly in the editor (even after a save/restart/load of the file). Thus I assume the parsing function of the INCLUDE_TYPOSCRIPT function perverts UTF-8 characters and doesn't pass them correctly to typoscript.

I have attached the test external file with arabic characters (generated with dreamweaver).

(issue imported from #M4221)


Files

home_ar.txt (41 Bytes) home_ar.txt Administrator Admin, 2006-09-14 17:35

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #32834: Remove BOM in getUrl()Closed2011-12-26

Actions
Actions #1

Updated by Alexander Opitz over 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • TYPO3 Version set to 4.0

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #2

Updated by Chris topher over 11 years ago

  • Status changed from Needs Feedback to Closed

That is working now.

I tested with this line in the TS setup:
<INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/default/TypoScript/setup.ts">

and in the file (which itself is saved in UTF-8 encoding)

page=PAGE
page.10=TEXT
page.10.value=abcdefUMLAUTEäöüÄÖÜßENDEghijkARABISCHأخبار عاديةENDE

Displays as it should (browser and TYPO3 output encoding set to UTF-8).

Actions

Also available in: Atom PDF