SMF Development > Fixed or Bogus Bugs

[4902] Text disappearing with SSI.php

(1/1)

Daegaladh:
Hi, I'm integrating SSI in a game control panel to get the news from my forum with ssi_boardNews, all works fine, except this:

Text printed via $news dissappears when have special characters like ¿¡áéíóú

For example, the title of one of the news is "aaaa", it works fine. The title of another one is "¿aa?", and isn't showing.
The same happens with some paragraphs on $news['body'], if a paragraph have an special character, it disappears, but not the rest.

The charset of the site is set to UTF-8, as well as my forums, and all the files are encoded in UTF-8 without BOM.

I've tested things like: ñññ<a href="', $news['href'], '">', $news['subject'], '</a>
and the ñññ is showing correctly, but the text from $news['subject'] is still missing, so I think is an SSI problem...

Any ideas? :S
Thanks

emanuele:
Confirmed.

The problem seems to be that is not sent the proper header.
Adding a line like:

--- Code: ---header('Content-Type: text/html; charset=' . (empty($modSettings['global_character_set']) ? (empty($txt['lang_character_set']) ? 'ISO-8859-1' : $txt['lang_character_set']) : $modSettings['global_character_set']));
--- End code ---
somewhere after
--- Code: ---reloadSettings();
--- End code ---
should fix it.

The same applies to subscriptions.php (reported few days ago in the Italian board) in particular when:

--- Code: ---if (empty($_POST))
die($txt['paid_no_data']);
--- End code ---

emanuele:
commit b1476c718b18c26a19a11a67944ee386c02d8359
Author: emanuele
Date:   Sun Aug 19

    Fixed a couple of encoding-related issues in SSI.php and subscriptions.php - Thanks Daegaladh and darbula for the reports

Navigation

[0] Message Index

Go to full version