Diamond with Questionmark in fonts - php

In my website I use the language Malayalam. Everything works fine except the excerpts. In the front page the website only shows like <10 words for each products. So most of the time at the end of the excerpt there is a black diamond with a question mark.
Now when I open the product listing page f or the same(with the same content, the question mark is not there.See this:
So can some one please explain me why it comes like this and come up with possibly a solution?
PS: The website is in wordpress!

i think your wordpress malayalam font are not supported to your css please define your HTML character - encoding to set your language in your site.
Generally ? is one type of character which are not supported to your language that means if we define copy right symbol as it is in our site at that time it will display ? character but on that we use &copy at that time it will displayed right character .

If someone else have this problem, I guess this could help:
The issue was, the theme creators used substr function to remove the extra characters from the excerpt. So this function was removing the characters which are obsolete when stand alone in this language and the browsers are not finding a way to represent these. So it comes up with the question marks in the diamonds. So I removed the substr function and limited the excerpt with lesser number of words to achieve the same functionality without breaking the layout of the theme.
And it worked!

Related

user-submitted hyperlinks in a text editor are broken by quotes

I run a wordpress job board, on which users can post job listings and the job description input uses tinyMCE.
The problem: when some users insert hyperlinks into the body of their listing, the link is broken in the published ad, with some added quote marks inserted, eg: http://example.com/en became ””//example.com/en/”””
This happened once in a while, not for every ad and not for every link within an ad.
I recently found out that what seems to be happening is that the following characters %E2%80%9D are getting inserted within the links, and these encode double quote marks. Say the page on my site where the link is posted is https://example.org/mypage/, and that the link the user is trying to post is https://usersite.com/theirpage/, the resulting URL will be some weird mash-up of the two:
https://example.org/mypage/%E2%80%9D/usersite.com/theirpage/
From some googling it seems this might be caused by users copy/pasting hyperlinks from word or webpages.
I'm trying to find a way to automatically prevent this so I don't have to manually clean up tens of links a day. I figure there must be something I can change in the tinyMCE settings.
I have found seemingly related questions from several years ago that suggest it could be to do with magic quotes (example1 example2 ) but I don't know how to implement the proposed solutions as I'm no php pro.
How would you go about solving this for a wordpress website? Any advice would be appreciated!
Your issue is occurring because users are inserting content from Word with double quotes (”), but they're not your standard double quotes.
Standard: " (straight)
Non-standard: ” (on an angle)
The encoding you’ve inserted (%E2%80%9D) indicates a character that cannot be parsed (understood), and encoding has been used to transfer the character through databases and web servers. This encoding provides the double quotes on an angle (”).
In JavaScript, the decoding of this encoding in demonstrated in the following:
decodeURI('%E2%80%9D')
”
I don't believe this is an issue with TinyMCE.
How to fix the issue?
There are a few solutions, and they’re going to require some development knowledge. Two safe options that come to mind are:
Before the content is stored, remove these characters using PHP string replace
If the issue is how users are inserting the content into TinyMCE, it might be worthwhile adding TinyMCE Link Checker (https://www.tiny.cloud/tinymce/features/link-checker). Note, this is a premium feature.
Disclaimer, I'm affiliated with Tiny. The comments above are of my own.

Encoding Dilema ! %C3%A9 vs e%CC%81

if you look to the two links bellow they look the same, but one of them works and the other is not working, after analysing the problem it seems that ther's a diffrence in interpretation of the "é" character and all the accentuated characters and the encoder either treat it as on char or the letter without accentuation + the accetnuation char
This problem is causing the images on website to be broken but they are here in the FTP
The question is how to fix that, is the fix in wordpress, database or server ?
Thank's and sorry for my poor english.
http://r20med.regions20.org/wp-content/uploads/2016/07/Portes-Ouvertes-sur-le-tri-sélectif-à-Hai-Essabah-Oran_017.jpg
http://r20med.regions20.org/wp-content/uploads/2016/07/Portes-Ouvertes-sur-le-tri-sélectif-à-Hai-Essabah-Oran_017.jpg
If you look at the screen capture below (taken from a text editor after copy-pasting your links above), you can see the difference.
The easiest solution I found was to change the filenames in an editor that only uses the accentuation you can see in the first row.
Conclusion: never trust uploads! Always check them for everything that's around! :) (This is true for filenames, texts, HTML, etc. - even if they are not intended to be harmful, they may block functions of your website / app and cause other problems!)
Note:
not all text editors show them to be different, so choose one that does!
if it is possible, get rid of accents in filenames (if uploaded use a function to sanitise them, or even make them like a slug in Wordpress with sanitize_title() or sanitize_title_with_dashes())

Wordpress special characters and the_content

I'm trying to solve a really strange bug on a website I've developed.
In specific tags of the markup the web font is not rendering special characters like "éáçã".
The font allows such characters. You can even see parts of the page with such characters.
One strange behavior is that if you type the character again with the developer tools the character gets displayed correctly.
Hope someone can help me on this one.
Best
Peter
Ok, so turns out the simplest way is to just confirm to deleted the text with bugs, save the post/page and write all again.

search for words with different Writing or spelling in database

im going to write a mail server script with php language and mysql database.i have to put search im emails tools in my programming TODO but there is a problem
there are some words with the same style and different encoding in some language
for example كتابي and کتابی or کبک and كبك
these work can be used for each other by the user computer keyboard layout
the كتابي and كبك are with arabic layout
but کتابی and کبک are in persian layout
i tried to find and change one language words to other one with str_replace function but this is not very useful because i dont know these type of words in all language over the world
there isnt any standard for these type of words?!
I am ignorant of Arabic and Farsi so I don't understand the difference between the end-of-word letters ي and ی. The first one, which is from your Arabic example, has a diacritical mark below it, and the second one doesn't.
It's clear, however, that these characters are unicode-encoded. It's not the keyboard specifically that you're dealing with, it's the unicode characters encoded by the keyboard. The Arabic and Farsi interpretations of the letters are not the same as each other.
The first one is 064A: http://www.fileformat.info/info/unicode/char/064a/index.htm
The second one is 06CC: http://www.fileformat.info/info/unicode/char/06cc/index.htm
Doing this on your column
SELECT CONVERT(table.word USING cp1256)
FROM table
will put in replacement characters (?) for the Farsi letters (the letters absent from the Arabic code page cp1256), e.g. turning کتابی into ?تاب?. That may help you detect which letters you need to work with.
You are going to need to develop a transliteration scheme, however. It may be a certain amount of work.

How To enter Special Characters in HTML editors and text box in php

I have developed a Quiz Contest Website in which admin can create questions and then those questions will be displayed .The Below is one of the question
The above is a question which admin will enter but as you can see there are special characters such as Square Root Symbol and equilibrium sign.Please help me on this how admin can enter above question in the admin site.
I have a HTML Editor for entering question and have text boxes to enter it's options.
There is a relatively new html5 library called MathML. See MathML on wikipedia
You can also play with unicode to achieve at least some of the symbols. see this example link
In general its best to just upload images that contain those special symbols. you can easily generate this kind of equations with latex.
The methods of entering special characters such as ⇌ (U+21CC) and √ (U+221A) depend on the environment: operating system, keyboard settings, installed auxiliary software, etc. You might consider linking to instruction pages such as http://www.fileformat.info/tip/microsoft/enter_unicode.htm but basically this is something that each user has to solve himself, unless you wish to enhance your HTML editor with special functionality.
(The vinculum associated with the square root sign cannot be produced directly at the character level – combining overline isn’t really suitable for it –, and although it can drawn in various ways, it probably does not pay off in a context like this.)
Your HTML editor of course needs to be Unicode-enabled
If I were you, I would write it in MATLAB or word-equation and take a screenshot and upload it as an image. That would be the easiest way.

Categories