Project

General

Profile

Actions

Bug #32834

closed

Remove BOM in getUrl()

Added by Steffen Gebert almost 13 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Miscellaneous
Target version:
-
Start date:
2011-12-26
Due date:
% Done:

0%

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

Description

UTF Byte Order Mark (BOM) can cause trouble, when they occur at the beginning of a file and TYPO3 functions don't skip this.

t3lib_div::getUrl() should just return the file's contents with BOM stripped (if there was one..). IMHO it's more metadata than part of the content.

See also Wikipedia: BOM


Files

32834.diff (400 Bytes) 32834.diff Steffen Gebert, 2011-12-26 13:37

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #19708: First line of external TS is discarded when using UTF-8 encoded filesClosed2008-12-17

Actions
Related to TYPO3 Core - Bug #20671: xml2array identifies UTF-8 files with BOM as ISO-8859-1Closed2009-06-25

Actions
Related to TYPO3 Core - Bug #16566: external UTF-8 files parsed with INCLUDE_TYPOSCRIPT are not correctly handledClosed2006-09-14

Actions
Actions #1

Updated by Steffen Gebert almost 13 years ago

Actions #2

Updated by Markus Klein over 11 years ago

I'm not sure if it's the best way to remove the BOM in getUrl(), because theoretically this could be any file, not only text files.
If we introduce this behavior once and have to remove it again, because of troubles with non-text files, we'll have regressions with extensions already expecting the automatic BOM removal.

Actions #3

Updated by Stefan Galinski over 11 years ago

  • Category set to Miscellaneous
  • Status changed from New to Needs Feedback
Actions #4

Updated by Steffen Gebert over 11 years ago

What about raising a warning in case of a BOM?

Actions #5

Updated by Markus Klein over 11 years ago

Sounds good. Warning in which log?

Actions #6

Updated by Alexander Opitz over 11 years ago

As we have now one central logging, I think it should go there.
But also why should we warn if it is a file that must contain BOM? We will throw errors for something that is normal.

Actions #7

Updated by Alexander Opitz almost 11 years ago

  • Status changed from Needs Feedback to Closed
  • Is Regression set to No

No feedback within the last 90 days => closing this ticket.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF