Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Problems with umlauts


Burt Adsit
Participant

@burtadsit

I’ve been looking at this problem and getting frustrated. I realized finally that the filter function actually does two things:

$content = htmlentities( $content, ENT_COMPAT, "UTF-8" );
$content = str_replace( '&', '/amp/', $content );

From http://loadaveragezero.com/app/drx/Data_Formats/Character_Encoding

[…] But there are a number of other issues to deal with. In particular, because UTF-8 is a multibyte encoding, meaning one character can be represented by more one or more bytes. This causes trouble for PHP, because the language parses and processes strings based on bytes, not characters, and makes mincemeat multibyte strings – for example, by splitting characters ‘in half’, bodging up regular expressions, and rendering email unreadable.

Karl can you just comment out the following lines please:

Line 46 $content = str_replace( '&', '/amp/', $content ) in bp-forums-filters.php

and line 52 $post_text = str_replace( '/amp/', '&', $post_text ); in buddypress-enable.php on the bbpress side.

I’d like to narrow this down to the htmlentities fn.

I’m gonna help solve this or just move to a planet where only ASCII is spoken. :)

Skip to toolbar