Correct appearance of accented characters.

Tamás Varga Posted in Technical Support 2 years ago

Which file should I enter so that the Hungarian character is finally displayed correctly in the Link preview?

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset='iso-8859-2'">

Replies
Indonesian Arsalan Shah Replied 2 years ago

Please contact openteknik to look not here. Also Sara is just a spam 🤣🤣🤣🤣 fake account.

Hungarian Tamás Varga Replied 2 years ago

Thank you Sara foster for your reply. I checked what I knew, utf8 is specified everywhere, so I will not change this. Could the font set be wrong in rendering?

in Sara foster Replied 2 years ago

The Content-Type HTTP header that you have specified in the <meta> tag is indicating that the character encoding of the document is ISO-8859-2, which is commonly used for Central European languages such as Hungarian. This encoding supports the special characters used in Hungarian.

However, keep in mind that the Link preview might use a different encoding for displaying the preview, so you should make sure that the character encoding is properly set in all relevant parts of the document, including the HTML document itself, any CSS files, and any other resources.

You might want to consider using the UTF-8 character encoding instead of ISO-8859-2, as it is a more widely used encoding that supports a much wider range of characters and is becoming the standard encoding for the Web. To specify UTF-8, you can use the following <meta> tag:

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">

Hungarian Tamás Varga Replied 2 years ago

I'm happy to enter it in the right place, what's important to me is that the preview works without errors.

Indonesian Arsalan Shah Replied 2 years ago

It have nothing to do with it, the way linkpreview fetches it tries to convert to utf8 and in that cases it may break. There are so many langauge and its difficult to write a full proof solution for all of them. You may look LinkPreview.php class (don't post code here or anywhere else)