Hello,

when going to the admin/people/permissions/roles
at my Drupal 7.0 site (core language Russian, using
CentOS 5.5, PostgreSQL 8.4.7, PHP 5.3), I get the
following warnings (please also see the attached screenshot):

Warning: htmlspecialchars(): Invalid multibyte sequence in argument в функции check_plain() (строка 1476 в файле /var/www/html/preferans.de/includes/bootstrap.inc).
Warning: htmlspecialchars(): Invalid multibyte sequence in argument в функции check_plain() (строка 1476 в файле /var/www/html/preferans.de/includes/bootstrap.inc).
Warning: htmlspecialchars(): Invalid multibyte sequence in argument в функции check_plain() (строка 1476 в файле /var/www/html/preferans.de/includes/bootstrap.inc).
Warning: htmlspecialchars(): Invalid multibyte sequence in argument в функции check_plain() (строка 1476 в файле /var/www/html/preferans.de/includes/bootstrap.inc).
Warning: htmlspecialchars(): Invalid multibyte sequence in argument в функции check_plain() (строка 1476 в файле /var/www/html/preferans.de/includes/bootstrap.inc).

Thank you!
Alex

CommentFileSizeAuthor
multi.png291.78 KBafarber
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RoSk0’s picture

+1 subscribing

parka’s picture

I've this problem as well, but it shows up only when a particular keyword is used as a search term.

E.g.
housing -> error
housing cost -> error
cost of housing -> no error

Puzzled.

sun-fire’s picture

+1 subscribing

pisajvmore’s picture

I have the same problem. But if i switch the language to English, everything is ok...

akanouras’s picture

Also happens with Greek as core language, whatever the current used language is.

You get one warning for each role with non-English characters in its name - when you install in a language other than English, the built-in roles are translated as well.

System information:
Debian Squeeze
PHP 5.3.3-7+squeeze1
PostgreSQL 8.4.7-0squeeze2

AdamGS’s picture

I receive a similar error when i search for words with the danish characters æø and å.

mightyiam’s picture

subscribe

Pacifik’s picture

core language Russian
subscribe +1
http://drupal.org/files/htmlspecialchars.png
So I did nothing yet added

Aleksey Zubko’s picture

Issue tags: +htmlspecialchars

core language Russian
subscribe +1

krak’s picture

subscribe

lightstring’s picture

Confirming the issue. User Dock from Russian Drupal community site got some solution (though it require to patch the Drupal's Core, so you should only use it as a temporary one for the first time in case that warnings annoys you much).

Edit the bootstrap.inc file in the 'includes' directory in your Drupal installation, line 1476:

Comment this line:

return htmlspecialchars($text, ENT_QUOTES, 'UTF-8');

And insert next:

  if (drupal_validate_utf8($text)) return htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
  return htmlspecialchars($text, ENT_QUOTES); 

It helped me and other people, but the correct solution without any manual changing the Core files must be finded.

lightstring’s picture

This issue still happens in version 7.2. As some code changed since 7.0 you'll need line 1354, not 1476 in case you'll decide to edit the bootstrap.inc.

droplet’s picture

Version: 7.0 » 8.x-dev
Status: Active » Closed (duplicate)
krak’s picture

This error not only for role. This error show when search text, for example.
Solution from http://drupal.org/comment/reply/1090290/4535306#comment-4485492 look better.

Emkas’s picture

Version: 8.x-dev » 7.1

I think exactly the same as krak. This solution looks very good for me.

droplet’s picture

Version: 7.1 » 8.x-dev
Status: Closed (duplicate) » Active

Okay. I suppose it may not same issue of #13

mefisto75’s picture

same here
upd. fixed per http://drupal.org/node/1062040

ChrisLaFrancis’s picture

Subscribe

Summit’s picture

Hi, I use module search404, http://drupal.org/comment/reply/1090290/4535306#comment-4485492 didn;t help and user module solution didn't help also..
EDIT: #11 did help me thanks, will this be added to D7.11 maybe?
greetings, Martijn

WhiplashInfo’s picture

This solution fixed my problem!

Thanks / Tomas

Summit’s picture

please backport solution #11 to D7.dev or 7.11 maybe?
Greetings, Martijn

totap’s picture

Hello.
I've had the problem with searching words on site with drupal 7.9 and 7.10
#11 / http://drupal.org/comment/reply/1090290/4535306#comment-4485492 / helped me :)
Thx a lot!

mmeytin’s picture

Version: 8.x-dev » 7.10

Comment in #11 fixed this for me as well - thanks! Can the fix be added into 7.x branch?

Richard.Li’s picture

Comment in #11 fixed help me as well. -- thx
my issue is url encoded by utf8

bartmcpherson’s picture

Version: 7.10 » 7.12

Still issue in Drupal 7.12. Moved to line 1572.
Changes in comment #11 corrected issue for me.

tecjam’s picture

Version: 7.12 » 7.14

Issue still here in d.7.14 - still in line 1572

Will #11 ever be committed?

Summit’s picture

Hi,

Also a +1 for committing #11, whats the downside of this? Otherwise it would already be committed right?

greetings, Martijn

droplet’s picture

Version: 7.14 » 8.x-dev
Status: Active » Postponed (maintainer needs more info)

The reported bug in this issue is fixed (see #13).

Please update or create a new issue:
- Needs steps to reproduce this bug
- Needs update the Issue Title & Summary

Heine’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Duplicate of #1062040: Fix role page weight title
Search excerpt UTF-8 issue was fixed in #987472: search.module doesn't consistently support multibyte characters

For other issues involving the 'invalid UTF-8 warning'; Please file an issue about the _source_ of the invalid data, not check_plain.

droplet’s picture

Jorgas’s picture

Issue summary: View changes

#11
Thanks a lot! It works for me. I faced same issue but after updating Drupal Commerce to 7.x-1.14 version, my Drupal version is 7.56, core language is Russian.