diff --git a/dynamic_entity_reference.install b/dynamic_entity_reference.install
index 8117f54..287cb58 100644
--- a/dynamic_entity_reference.install
+++ b/dynamic_entity_reference.install
@@ -5,6 +5,7 @@
  * Update functions for the dynamic_entity_reference module.
  */
 
+use Drupal\Core\Entity\EntityTypeInterface;
 use Drupal\Core\Entity\Sql\SqlEntityStorageInterface;
 
 /**
@@ -36,7 +37,7 @@ function dynamic_entity_reference_update_8001() {
         $column = $table_mapping->getFieldColumnName($field_storage_definition, 'target_id');
         $spec = [
           'description' => 'The ID of the target entity.',
-          'type' => 'varchar',
+          'type' => 'varchar_ascii',
           'length' => 255,
           'not null' => TRUE,
         ];
@@ -50,6 +51,14 @@ function dynamic_entity_reference_update_8001() {
         }
         // Add the integer column after converting the original column.
         $service->handleEntityType($entity_type_id, $field_name, $field_storage_definition);
+        // For the sake of completeness change the target type to ASCII as well.
+        $spec = [
+          'description' => 'The Entity Type ID of the target entity.',
+          'type' => 'varchar_ascii',
+          'length' => EntityTypeInterface::BUNDLE_MAX_LENGTH,
+        ];
+        $column = $table_mapping->getFieldColumnName($field_storage_definition, 'target_type');
+        $schema->changeField($table, $column, $column, $spec);
       }
     }
   }
diff --git a/src/Plugin/Field/FieldType/DynamicEntityReferenceItem.php b/src/Plugin/Field/FieldType/DynamicEntityReferenceItem.php
index 7fccffb..dee64c8 100644
--- a/src/Plugin/Field/FieldType/DynamicEntityReferenceItem.php
+++ b/src/Plugin/Field/FieldType/DynamicEntityReferenceItem.php
@@ -99,12 +99,12 @@ class DynamicEntityReferenceItem extends EntityReferenceItem {
     $columns = array(
       'target_id' => array(
         'description' => 'The ID of the target entity.',
-        'type' => 'varchar',
+        'type' => 'varchar_ascii',
         'length' => 255,
       ),
       'target_type' => array(
         'description' => 'The Entity Type ID of the target entity.',
-        'type' => 'varchar',
+        'type' => 'varchar_ascii',
         'length' => EntityTypeInterface::BUNDLE_MAX_LENGTH,
       ),
     );
