After a few releases of google chrome browser a new bug appeared which was not in previous versions.
I have a web page which shows date and time in Arabic characters.
there is a picture:
it was just fine before updates, and it is fine in other browsers.
I don't know if the problem is from my code (not defining some thing) or it's chrome new bug.
and notice that I use a localizer for Iran.
and therefor my fonts are Persian and using UTF-8 char-set
note that just number between two slashes or two dots change and etc.
Related
In a particular html file all "ti","fi","tt" characters are missing while viewing (The characters are there when we view it in inspect element).
eg: "Solution" is miss spelt "soluon".
Sample screenshot
The same html works well with FireFox. The above issue reproduces in Chrome and Safari.
Version
Chrome version : Version 50.0.2661.94 (64-bit)
Safari version : Version 9.0 (11601.1.56)
Kindly help me to sort this out.
The above issue occurs only in - webkit web browsers like chrome and safari - which provides support for ligatures - whereas browser like firefox does not.
A ligature is a combination of two or more letters joined as a single
glyph
Root cause
This issue with missing characters is due to ligature support provided by these modern browsers - let me explain how
1.The tool while converting - it converts characters to glyphs using poppler for rendering - now these browser when they come across characters like tt tf ti ff fi consider them to be ligature and searches for glyphs corresponding to tt and not t t
2.Since they do not have their corresponding glyphs - they just skip the characters and renders the rest - so, we fount the characters missing
Could be solved by
Disabling/ Turning-off the ligature in these browsers - embedding the css in the generating content
For more details please refer:
Prevent ligatures in Safari (Mavericks/iOS7) via CSS
Please correct me if I am wrong.
FONT ISSUES WITH PDF TO HTML CONVERSION
All "ti","fi","tt" characters are missing
SAMPLE SCREENSHOT
Font overlapping issue
SAMPLE SCREENSHOT
NOTE: I don't get this issue with firefox. Getting the above issues in chrome in safari browser
I AM USING
Using the 0.13.6 version of pdf2htmlEX
Using the following command to convert pdf to html
pdf2htmlEX --split-pages 1 --zoom 3 --fit-width 920 --correct-text-visibility 1 --dest-dir $1 $2 2>&1
TRIED
Using --fallback 1 option solves all my above problems. But
The fallback option reduces the clarity of document.
Table in the page disappears rather replaced with empty space.
DOUBTS
Could you please explain a bit more on fallback?
I have tried the above one (using fallback). Please suggest me if you prefer a different approach to solve the above problem with fonts.
Getting the above issues with chrome and safari whereas, in Firefox it is working fine.
The above issue occurs only in - webkit web browsers like chrome and safari - which provides support for ligatures - whereas browser like firefox does not.
A ligature is a combination of two or more letters joined as a single
glyph
Root cause
This issue with missing characters is due to ligature support provided by these modern browsers - let me explain how
1.The tool while converting - it converts characters to glyphs using poppler for rendering - now these browser when they come across characters like tt tf ti ff fi consider them to be ligature and searches for glyphs corresponding to tt and not t t
2.Since they do not have their corresponding glyphs - they just skip the characters and renders the rest - so, we fount the characters missing
Could be solved by
Disabling/ Turning-off the ligature in these browsers - embedding the css in the generating content
For more details please refer:
Prevent ligatures in Safari (Mavericks/iOS7) via CSS
Please correct me if I am wrong.
I have a really strange behaviour in Safari. The problem is that I have a string (inside an tag) which has one part of it written in cyrillic (Bulgarian) and the other part written in latin (English).
On all the desktop browsers I have, it's all working good and there are no problems at all. Then I took my iPhone, and I noticed a surprise: part of the sentence is bold (as it should be according to the CSS), and part is normal.
You can see this weird behaviour here:
http://www.buderus-bg.com/bultherm/product/10
What can it be? And why I get this problem only on iOS?
The charset of the website UTF-8. And that field in the database is a utf8_general_ci.
You are trying to display the text using a font that doesn't contain Cyrillic characters (Google's Open Sans with subset=latin), so the browser will need to find a different font to display the Cyrillic text.
Solution: remove the subset=latin bit.
Edit: the fact that it happens only in iOS with Safari is a coincidence. The browser searches for a font that can display the Cyrillic characters, and what it finds is sufficiently different from Open Sans that you can see the difference in thickness. On my desktop machine, I see the difference too.
We have a search results page that worked fine but now, when viewed in IE9 it's forced into compatibility mode and breaks the layout (we don't support IE <9).
Some poking around seems to point to the opening < of the doctype being converted to an invalid unicode character, which is causing the IE grief. Why is this and what to do about it? I am at my wit's end here.
The rest of the site is fine, and this problem is only in IE. Firefox, Chrome, Safari all ok.
http://www.finecooking.com/search?cx=009096020989677304441%3Akkzh0x3f3yc&cof=FORID%3A9&ie=UTF-8&q=chicken
(you can also just search for anything)
It turned out one of the team members saved one of the includes for this page as UTF-8 WITH BOM, the BOM is that rogue character that broke the page. Resaving the file with no BOM fixed everything.
I can't tell you how many includes we had to check.
I tried it in several workstations, sometimes the Characters are displayed properly, sometimes only the last part is displayed. Any idea what is causing this? Any solution?
Here is the HTML:
http://dl.dropbox.com/u/20727629/chi/chi.html
Here is the image of browser with issue:
http://dl.dropbox.com/u/20727629/chi/chi_issue.gif
Here is the image of browser showing Chinese characters correctly:
http://dl.dropbox.com/u/20727629/chi/chi.gif
I've tried several things:
In Windows, setting Regional Settings Format and Language to Chinese (Hong Kong Sar) sometimes fix it for Firefox (it worked in Windows Server 2003, and Windows 7), but IE and Chrome still displays squares or blank for some Chinese chars. Also it didn't work in Windows XP machine I tried.
For XP, In Regional Settings installed files East Asian languages but it didn't fix the problem.
In IE, I tried Tools -> Internet Options, setting Font of Chinese to MingLiu or other Chinese fonts. Didn't work.
Tested in the ff environment (English OS):
Windows 7
-Works in FF after setting Regional settings to Chinese. IE and Chrome still don't display it correctly.
Windows Server 2003
-Works in FF after setting Regional settings to Chinese. IE and Chrome still don't display it correctly.
Windows XP
-Problem FF, Chrome, IE
Ubuntu
-Problem
It seems to me, that many of these characters are in the Unicode Private Use Area. If and how those characters are displayed is highly platform- and font-dependend.
My FF on Linux shows the same rendering as the issue graphic. It means, that there is no character in the list of tried fonts to render the codepoint, and a fallback is used.
The characters, as far as I can oversee, are also present as other codepoints. Use these instead of the Private Use ones, and your chances to get the text rendered will much improve.
For example, you use U+F303 for the first character, the correct one would be U+31C0.
Please try diffrent encoding / character set. You are using UTF-8.
Most of chinese websites use gb2312 (simplified) or Big5 (traditional).
Do you know how to convert UTF-8 text file to diffrent encoding?
The problematic characters seems to be characters in the Big5-HKSCS charset. Convert them to Unicode.