Hello, i cant seem to get it to work that an Option which is called "Größe" (Size in German) is being displayed correctly. When i add the Option in the Backend the ö is first being displayed, after a refresh i get this : "Gr��e" and the same is being displayed on the Storefront. I've tried adding in UTF-Encoding in various places like the next config and in the Meta Tag for the layout, nothing seems to work, Postgree runs on UTF-8 so the DB shouldn't be a Problem. Does anyone know a way to get it to work? I could hardcode it into the Storefront but would like to fix it another way
#UTF-8 Encoding
1 messages · Page 1 of 1 (latest)
Hi, did you manage to solve this problem yet? I also have problems regarding the letters ä,ö,ü. Medusa Admin doesn't allow me to create products which have these letters in any of the fields (title, subtitle, description etc.).
The error I get is the following:
ERROR: invalid byte sequence for encoding "UTF8": 0xe4 0xf6 0x04
Unfortunatley no :/
How exactly did you plan on hardcoding it into the frontend?
@worldly finch Just writing it out basically “größe” {sizePicker}
But i might have found a way will update if it works
Would be really nice, vielen Dank 🙂
Hi @thin lagoon, hast du mittlerweile eine Lösung gefunden? 😄
@worldly finch leider nicht war bisschen side Tracked durch mein anderes Projekt.
Hab aber die Vermutung das beim Speichern von den Produkten bzw von den Varianten erst alles passt aber sobald es in die DB geht und von da aus gefetcht wird die Frage Zeichen kommen, denke bei der Produkttitel checkt er bevor er die in die DB speichern will bei den Vatianten macht medusa das einfach und beim neuen Fetchen kommen dann die fehlenden Charaktere
Mein Plan war es die DB dazu zu bringen utf8 zu speichern (Wenn die das bislang nicht tut) aber kam noch nicht dazu
@thin lagoon die DB hatte ich bereits abgecheckt, dort wird als encoding UTF-8 verwendet. Ich hab versucht die Texte mit ä,ö,ü etc. direkt über SQL in der DB zu speichern und es hat funktioniert. Ich vermute das Problem liegt am fetchen der Daten aus der DB, aber konnte den dafür relevanten Code leider nicht finden.
Ah gut zu wissen ich schau mal ob ich das irgendwie heraus bekomme wo der Fehler kommt
@thin lagoon and for everybody else who may find this thread in the future:
I found the solution for adding letters such as ä,ö,ü etc. to the product descriptions / titles.
In the .env of your medusa backend you have to add the following line:
PGCLIENTENCODING=UTF8
This solved the problem for me. The descriptions / titles get displayed without errors in the frontend now 🙂
@thin lagoon Nvm, it only works until the first refresh...
Ryp😂
Bin gerade leider beschäftigt schaue aber in ca 2/3 wochen weiter wie man das lösen kann
Alles gut, bei mir ist es bisschen dringender. Gucke mal weiter...😂
Viel glück
Danke 🙂