Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A non-UTF8 char has to trigger an alert during the import #156

Open
lamasfoker opened this issue Jan 19, 2023 · 1 comment
Open

A non-UTF8 char has to trigger an alert during the import #156

lamasfoker opened this issue Jan 19, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@lamasfoker
Copy link
Member

A non-UTF8 char on a field has to trigger an alert during the import and stop it for the current product otherwise, the import itself should remove this char and complete the data transmission to Sylius.

@lamasfoker lamasfoker added the enhancement New feature or request label Jan 19, 2023
@fabianaromagnoli
Copy link
Member

Sometimes also control characters can be cut and pasted into Akeneo text fields, such as the DLE character. Those characters are not visible because they are not printable, but they cause issues if they are used in XML files: XML does not support control characters, even if the field is enclosed in CDATA. To be exact, in XML 1.1 you can use some control characters, using NCR notation, but they are useless characters, so that we just need to remove them from texts.

Control characters can be removed with a simple regexp:

preg_replace('/[[:cntrl:]]/', '', $text)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants