2

I need to store phonetics for word definitions in a plain text field. An example would be something like "Craft Website" => \ ˈkraft ˈweb-ˌsīt \, like you'd see in a dictionary.

If I try saving \ ˈkraft ˈweb-ˌsīt \ in a custom plain text field, I get a database exception, presumably because it takes issue with all the unusual characters not found in UTF-8.

enter image description here

Does Craft have a way to handle this without needing to manually adjust my database?

1 Answer 1

1

Does Craft have a way to handle this without needing to manually adjust my database?

Swap to PostgreSQL? :)

This is more of a MySQL limitation/configuration issue than a Craft/PHP one.

You can alter the charset/collation of the column the plain text field is being saved to utf8_mb4 and utf8mb4_general_ci and that should solve it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.