View Issue Details

IDProjectCategoryView StatusLast Update
0023645mantisbtotherpublic2017-12-04 02:17
ReporteratrolAssigned Toatrol 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version2.8.0 
Target Version2.9.0Fixed in Version2.9.0 
Summary0023645: No preview of ANSI encoded text files that contain German Umlauts
Description

Preview (clicking + to expand) of a ANSI encoded text file that contain German Umlauts is not possible.
You get just an empty text area.

UTF-8 encoded files work, see attchached examples.

TagsNo tags attached.

Activities

atrol

atrol

2017-11-17 03:47

developer  

utf8-umlaut.txt (13 bytes)
Das ist übel
utf8-umlaut.txt (13 bytes)
ansi-umlaut.txt (12 bytes)
Das ist übel
ansi-umlaut.txt (12 bytes)
atrol

atrol

2017-11-17 03:49

developer   ~0058215

Strange, it works on https://www.mantisbt.org/bugs, but not on my installation.
Will have to check if this is caused by running different MantisBT versions or by different versions of PHP and OS.

atrol

atrol

2017-11-17 06:10

developer   ~0058217

Caused by different behavior of htmlspecialchars depending on PHP version.

Will provide a PR for it.

atrol

atrol

2017-11-17 09:06

developer   ~0058219

PR https://github.com/mantisbt/mantisbt/pull/1241

Related Changesets

MantisBT: master 2fd81a3e

2017-11-17 08:46:24

atrol

Details Diff
Fix preview of non UTF-8 text attachments

Functionality of function htmlspecialchars depends on PHP version [1].

The change ensures that
- UTF-8 is used in any case
- Single non UTF-8 characters are replaced in the string
instead of replacing the whole string by an empty string

[1] www.php.net/manual/en/function.htmlspecialchars.php

Fixes 0023645
mod - core/print_api.php Diff File

Issue History

Date Modified Username Field Change
2017-11-17 03:47 atrol New Issue
2017-11-17 03:47 atrol File Added: ansi-umlaut.txt
2017-11-17 03:47 atrol File Added: utf8-umlaut.txt
2017-11-17 03:49 atrol Note Added: 0058215
2017-11-17 06:09 atrol Assigned To => atrol
2017-11-17 06:09 atrol Status new => assigned
2017-11-17 06:10 atrol Target Version => 2.9.0
2017-11-17 06:10 atrol Note Added: 0058217
2017-11-17 09:06 atrol Note Added: 0058219
2017-11-24 02:54 atrol Changeset attached => MantisBT master 2fd81a3e
2017-11-24 02:54 atrol Status assigned => resolved
2017-11-24 02:54 atrol Resolution open => fixed
2017-11-24 02:54 atrol Fixed in Version => 2.9.0
2017-12-04 02:17 vboctor Status resolved => closed