output-data-config-toolkit icon indicating copy to clipboard operation
output-data-config-toolkit copied to clipboard

[Bug]: Special Chars are corrupted in output channel definition

Open aweichler opened this issue 1 year ago • 1 comments

Expected behavior

Add a "Ω" Sign in the operators of a output channel definition, then save and load and the sign get shown correctly.

Actual behavior

Add a "Ω" Sign in the operators of a output channel definition, then save and load and the sign is corrupted.

Steps to reproduce

Add a text operator in output channel definition, enter a "Ω" Sign at the Text field and click apply for the operator and the output channel definition. Then open the Channel Definition again and the "Ω" Sign is corrupted. Before save: operator-text-setting-before-save After Save: operator-text-setting-after-save

aweichler avatar Jun 13 '24 03:06 aweichler

I found out that the problem is caused by the character set "latin1". Changing the character set to "utf8mb4" fixes this issue.

The SQL for the fix is:

ALTER TABLE `bundle_outputdataconfigtoolkit_outputdefinition` 
CHANGE COLUMN `configuration` `configuration` LONGTEXT CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_bin' NULL DEFAULT NULL;

Is there any reason for using "latin1"? I am not sure if the table can be altered safely without data loss.

aweichler avatar Jul 01 '24 05:07 aweichler

I found out that the problem is caused by the character set "latin1". Changing the character set to "utf8mb4" fixes this issue.

The SQL for the fix is:

ALTER TABLE `bundle_outputdataconfigtoolkit_outputdefinition` 
CHANGE COLUMN `configuration` `configuration` LONGTEXT CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_bin' NULL DEFAULT NULL;

Is there any reason for using "latin1"? I am not sure if the table can be altered safely without data loss.

hey, just saw this issue. i had the same bug a few weeks ago with a different greek letter. for me changing the table column similar to your approach worked without any issues so far on a production system

AlternateIf avatar Sep 12 '24 06:09 AlternateIf