I have translated Arabic content in Microsoft Excel. Whenever I am copying it to my Wordpress site with Polylang Arabic language support, the letters get messed up like this:
الهاتف (اختياري)
Although the original text was like this:
I'm using Windows 7 with Office 2010 and this applies to every application I want to copy to. I've installed Arabic support for Windows and have tried both copying and pasting with Arabic keyboard as well as English. No luck.
Is there any way to do it?
I copied you text into Google and it formats it correctly, like in your image. You will need to set proper right to left layouts when ever you use these.
Try
<!DOCTYPE html>
<html dir="rtl" lang="ar">
<head>
<meta charset="utf-8">
Some text that is right to left...<p>
الهاتف (اختياري)<p>
</head>
</html>
Try the above code, this will display the wrong Arabic you gave to properly formatted Arabic.
The Important part is this, it sets the text direction to right-to-left "rtl" and language to Arabic "ar":
<TAG dir="rtl" lang="ar">...</TAG>
You can use dir= and lang= with quite a few tags in HTML.
You can use the right-to-left mark character:
الهاتف (اختياري)
Without :
الهاتف (اختياري)
With :
الهاتف (اختياري)
Related
I am facing issues that Chinese characters are not displayed properly in chrome. Below is a screenshot of whats happening.
I am wondering is there any extensions that is causing this or its because my CSS / fonts are not coded well.
I really want to fix this via my code side. Is it possible?
EDIT: Some of the words show up while some did not.
I did add in the meta charset=UTF-8
EDIT2 : #torazaburo, showing you the code snippet. The problem is that firefox is able to display all the Chinese text!
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<h1>My Website</h1>
<p>Some text...</p>
</body>
have you tried using meta charset
<meta charset="UTF-8">
It enables browsers to understand any language it can be chinese , Urdu , hindi any language which you will write.
I am wondering is there any extensions that is causing this or its because my CSS / fonts are not coded well.
It's unlikely that this has anything to do with an extension. It could be due to a font issue, but that's also relatively unlikely. Probably you have an encoding problem, so:
Make sure your file is saved in UTF-8.
Make sure the file is being served as UTF-8.
Specify the the <meta charset="UTF-8"> tag proposed in another answer.
Make sure you have fonts selected which can display Chinese.
See also the second answer to this question.
I need to insert the following HTML meta tag to the QTextBrowser’s head tag:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
If I insert the tag along with my normal HTML content in the QTextBrowser, it is not working.
Because I am reading a huge number of HTML files with Unicode fonts and loading their content into the QTextBrowser, but without that meta tag the Unicode fonts are not showing properly in the QTextBrowser.
I can’t add that meta tag to each individual files too, one thing because they are too many, 16,280 files; another thing because, as I tried with one file, still the Unicode fonts do not show properly in the QTextBrowser.
We have recently launched a humble website, powered by Wordpress. And now, some of our users complain that certain Swedish special characters do not display properly. As far as I know, this has only happened on Android, but regardless of broswer. But I have been unable to reproduce this on my desktop PC as well as my Android device (both 4.2 and 4.4).
I have tried to set the first line of the CSS editor to:
#charset "UTF-8";
But can't verify that this works. Any tips on how I reproduce this?
And should I look into other alternatives, instead of the CSS editor? When I view the source of the start page, I see the following in the header:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
In case the question is more easily answered through a visit, the site is http://www.slutet.nu
UTF-8 is not the problem, the font Open Sans is it. The character sub-set you use doesn’t contain all needed glyphs, so the browser has to get the missing glyphs from other fonts. Android and some older desktop browsers aren’t very good with glyph substitution, so that might fail.
Remove Open Sans, use a system font, and you are fine. Or use an extended set of Open Sans, which contains all needed glyphs. This will never be complete, because you cannot know which fonts are needed for an automatic translation.
The page not working in IE8 is http://gainntrain.com/shopping/index.php
It IS working chrome and firefox...
This page loads from CubeCart, but the page I edited to alter the skin http://gainntrain.com/shopping/skins/KitaBlue/styleTemplates/global/index.tpl
That page has the same problem in IE8
The thing I don't understand is that the same header works fine on other pages of the site in IE8
Changed the <header> and <nav> tags to divs with classes using the styles that the tags had and that seems to be handling it just fine so thanks for the answers!
Look at
Validator
and
Jigsaw
Notice that the only errors in Jigsaw are CSS3 rules.
I would suggest looking at the HTML because of this line in Validator's analysis of your page
Line 11, Column 107: end tag for "link" omitted, but OMITTAG NO was specified
…="http://www.gainntrain.com/site/css/style.css" type="text/css" media="screen">
✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
It looks like your document is using HTML5 features but is using an older doctype declaration. I would suggest changing:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
to:
<!doctype html>
<html>
That is as long as it doesn't break the site. :]
Try an online HTML validator on the output, like this one. If you choose the right validator, it's likely to be able to pick out the sticky bits that work better in some browsers than others. Sifting through code by hand to find a solution like this is difficult and time-consuming.
I saved a MS-Word Doc with the 'save-as' option of "Web Page, Filtered". I want to insert the HTML & CSS code that was generated inside an HTML5 document that has my header, menu, footer, etc. The first question is in regard to charset and header info:
MS-Word generated HTML (Saved as "Web Page, Filtered"):
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=Generator content="Microsoft Word 12 (filtered)">
My HTML5 template:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
The main issue I see is the two different character sets (UTF-8 vs windows-1252). Additionally, I am guessing the meta tag "name=Generator content="Microsoft Word 12 (filtered)" will not be a problem and perhaps can just be removed (?).
I can sort out the CSS with one exception. I do not know what the '#' symbol means. Example:
#font-face
{font-family:"Book Antiqua";
panose-1:2 4 6 2 5 3 5 3 3 4;}
I looked through the document and do not see "font-face" IDs or classes. So I am guessing this might change all of the fonts in the document. This might be a problem (if true); as stated, the new document will have my menu, header, footer, etc.
You should not copy&paste anything that ms office pukes out into a website; mostly because your code becomes a big mess, and it will most likely only look right in IE. This just my experience after i got a lot "Your website is broken!!!" complains after someone pasted ms-word-"html" into joomla pages.
Anyway, charset on your website must be utf-8.
Your #font-face looks broken to me. I only know it in a slightly different syntax:
#font-face {
font-family: "Awesomefont";
src: url("fonts/awesome.ttf");
}
this alone wont do anything, until you apply "Awesomefont" somewhere else:
h1 { font-family: "Awesomefont"; }
Here is a set of PowerShell scripts that will clean Word-Filtered HTML and correctly tag super/subscripts about 95% of the time. (No, you can't get better than that, Word is made for print.)
https://github.com/suzumakes/replaceit
This also changes the characters that M$ barfs out in windows-1252 class to their appropriate UTF-8 counterparts. It removes all the styling and classes so that you can drop the HTML straight into your template with minimal fuss. Depending on how crazy the person who made your Word doc went with justifying text and funky layouts you may have just a few minutes of cleanup, or you may have to fix M$'s propensity to insert soft hyphens all over the place.
Instructions are there in the ReadMe and if you happen to encounter any additional characters that need to be caught or come up with any tweaks/improvements, I'd be happy to see your pull request.