Hi,
I'm trying to display the slogan of the site, but from all the text can only see one letter.
The data stored in the 'system.site' table in the correct format (entire text). I suspect that the problem arises from the treatment of Unicode strings as a simple strings by function of removing null values, but I do not know how to fix this...

Comments

VM’s picture

are you adding odd characters? Slogan seems to work fine on my test installation.

sprite’s picture

Please specify the exact version of Drupal you have installed.
Please indicate what theme you are using.

Please note that the problem you are experiencing is not observed by the general Drupal community.

spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...

Schrodinger Kater’s picture

Yes, I am also inclined to the fact that this particular problem, but unfortunately did not notice at what moment this happened. I'm using Drupal version 8.2.5, and a built-in theme Bartik, but it can also be observed in other (Seven, Stark).
No odd characters, only plain text, only the English letters.

sprite’s picture

I can't reproduce the problem.

spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...

Schrodinger Kater’s picture

I did a full install Drupal from scratch. The same picture of what is happening...
A detailed description of the platform: Windows Server 2012 R2, IIS 8.5, PHP 7.1.0 nts x64 (as FastCGI), MySQL 5.7.17 x64, Drupal 8.2.5.
Hmm, I do not know where to look for the problem.

Stefan Lehmann’s picture

Did you doublecheck that the encoding of that column / your database generally is set to UTF-8?

I like cookies!

sprite’s picture

Drupal 8 uses the:

utf8mb4_general_ci

character collation.
That should be checked.

spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...

Schrodinger Kater’s picture

Yes, the schema default collation and the table default collation sets as utf8mb4_general_ci (I checked it a few times). But, if looked on a column properties of the 'config' table, a character set declared as ascii and a collation declared as ascii_general_ci.
And additionally for this, I found some interesting function (in this file '\core\lib\Drupal\Core\Database\Driver\mysql\Schema.php'):

  protected function createFieldSql($name, $spec) {
    ...
    if (in_array($spec['mysql_type'], $this->mysqlStringTypes)) {
      ...
      // Note we check for the "type" key here. "mysql_type" is VARCHAR:
      if (isset($spec['type']) && $spec['type'] == 'varchar_ascii') {
        $sql .= ' CHARACTER SET ascii COLLATE ascii_general_ci';
      }
    }
    ...
  }

I guess, it is a normal condition for the field, because the field type is exactly a varchar (256).
Maybe something else?..

Schrodinger Kater’s picture

sprite’s picture

Drupal 8 remains a beta level code base.

Maybe in a year or two it will be ready for production websites.

spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...