- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Using them in the post editor is fine, but on the site it either shows up as gibberish, or for some reason, as a different special character.
I’ve done things like make sure the char encoding is right and I went into the wp database and checked to make sure the characters were saving properly.
In firebug they’re showing up as the proper characters, but they’re not displaying as the proper characters. Any ideas?
Here’s another little piece of info, when I display the text, it’s text copied with jquery. I display the title of an image in a tooltip when you hover it. Is it possible that when I copy the text with jquery it’s messing up the special character?
When I hover the image I actually remove the title from the image (to remove the default browser tooltip) and then return the image when you hover off, and the returned title is the proper title again
Do you have your page set to “utf-8”, or are you using “8859-1”?
In HTML5, you can set it using
in the head of the page.
Another thing you could do is use the HTML escape codes like “à” would be “à” (decimal), “à” (hex), or “u00e0” (still hex) inside of javascript.
I tried both of those. The character was coming through properly, just wasn’t displaying properly. Firebug showed the proper character and copy and pasting the text into the search bar also showed the proper character.
I did figure it out though. I remembered that I was using @font-face, and realized the problem was that that font file didn’t include those special characters in them so it was just displaying gibberish. Switch fonts did the trick.