UTF-8 does not work in Safari (inside iphone app) - ios

So I have almost no iphone programming experience, yet I have found some basic rss reader code and playing around with it.
The thing is, when I visit the link in my Chrome browser, it works fine in terms of character encoding, but when I visit it through the built-in browser in the iphone app code I have (in iphone simulator), the characters are not displayed properly.
Why it could be?
Edit:
So what I was trying to access over the web browser was a simple UTF-8 text file (I was too lazy to put into an HTML), and I could not see the non-English characters.

You must tell the client that the file is in UTF-8 format. If you are running apache, you can add this to your .htaccess file:
AddDefaultCharset UTF-8
Or you can put the text into a HTML file and add a meta tag for the charset encoding:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Related

Problems with UTF-8 without BOM, ASP MVC 5 project, does not display special characters well

I'm just trying to create a new ASP.NET MVC 5 project with Visual Studio 2017. The files created by VS are encoded in UTF8 but without BOM.
After creating the new project using the VS template, if I just add one special character to one page and run the project, the character is not displayed correctly by my browsers. é looks like é for example.
I used to develop with VS2013, and the files were encoded in UTF8 with BOM.
I made some search and I saw that's a good thing to remove the BOM from file as it's seems to be unnecessary.
I read that I should add <meta charset="utf-8" /> (html5) or <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> (previous versions of html) to tell to the browser that the content of the page is UTF-8, but these tags are already present in the layout of the template website created by VS, but it's still not working.
Do I miss something?
Does a charset "utf8-without-bom" exists?

IE8 emulation mode in IE11 breaks Google font Playball

This Magento 1.4.1.1 website needs this markup:
<meta http-equiv="X-UA-Compatible" content="IE-EmulateIE8"></meta>
to work under IE9 to IE11 (prototype compatibility reasons).
With IE9 all is fine (I can't test with IE10).
But with IE11, the google font Playball used mainly on the header is not shown correctly. IE11 shows an other unknown (for me) font.
This issue is directly connected with the specific markup because if I deactivate it all becomes fine. I red on another post:
Google is only offering the font in .woff format. IE8 doesn't support
.woff, so the browser (acting like IE8) ignores it.
For the moment I use the normal Google API to be able to use this font, including:
<link href='http://fonts.googleapis.com/css?family=Playball' rel='stylesheet' type='text/css'/>
My question is:
maintening the markup, is there a workaround, or another way to include the font on the website, to be able to show correctly the google fonts with IE11 (and other browsers, of course) ?
I found an efficient workaround:
If your server is apache, you can replace this directive in the by 2 lines on the .htaccess file at the root of your website:
BrowserMatch MSIE best-standards-support
Header set X-UA-Compatible IE=8 env=best-standards-support
With this I have no more problems with Google fonts under IE10 or IE11 even emulating IE8.

ASP classic: String encoding

I encountered a really strange error yesterday when I refactored the start page of a old ASP classic web application.
But before I explain the problem I must explain how the website is built.
The web itself is made of ASP pages saved as ANSI windows 1252. The output sent to the browser I guess is encoded as codepage 1252, because no encoding is declared neither in the response header nor in the HTML HEAD tag.
The Problem:
When I refactored the login page (due to security issues) I did the following:
converted the ASP-file to utf-8
Added <%# Language="VBScript" #CODEPAGE=65001 %> to the top of the page
Added <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> to the HTML HEAD
The login page displayed nicely. But! The rest of the website now got encoding issues (when displayed on a web browser) on all pages (except the login page of course).
How can that be? I didnt change any other pages, and the encoding settings made in the login page should only affect that single page.
Please enlighten me. Please! :-)
Because the codepage is stored in the session and it is changing on the login page. If you clear cookies or open an incognito browser, the problem should go away until you return to the login page again.

Safari display question marks

I have a website that displays fine with IE and Firefox.
But the menus are replaced by question marks when using Safari (I have been told, not having Safari on my PC).
Here is the home page (get rid of spaces):
www.v u b r i d g e.com
Any help welcome.
BTW, is there any Safari emulation for Windows based PC?
I don't see any question mark on your web page, even on the French version. If there is a problem, it's an encoding problem. Check that all your files are encoded in iso-8859-1 (the text encoding you declared in the meta html tag on your web page). If they are, then it could be your server that say the client the content is encoded in utf-8 or any other text encoding. In order to fix it, just configure the header content-type and charset to the correct value. (I've seen your website is made out of aspx which I don't know, but in php it would be header("Content-type: text/html; charset=iso-8859-1;");, to be placed before any output)

IE Chinese characters

I am currently working on a site which has some pages displaying Chinese characters. These display fine on Firefox however on IE I receive a simple box where the character should be.
I thought this was simply because I did not have the language pack installed onto Windows, but then I was provided some samples of it working.
Can someone please explain why this page displays properly for me in IE
http://www.ifc.org/chinese
But this does not?:
http://www.jjl.cn/
(Google.cn does not display correctly either)
I have tried
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
But have had no luck.
Thanks
It has nothing to do with the encoding, both sites work fine on my browser. It is because you do not have the proper language fonts installed on your computer.
I typically install these fonts upon install, so don't recall that exact installation process. But you can likely find out how by going to Control Panel -> Regional and Language Options. If you still can't figure it out check out this wiki link.
http://en.wikipedia.org/wiki/Help:Multilingual_support_(East_Asian)
note Keep in mind that input methods(used for typing the languages) are different than character fonts(used for displaying the languages).
note 2I typically use UTF-8 as the charset for all my pages, especially if I know I will be dealing with multilingual content.
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Here is how I tell what my problem is when dealing with characters not displaying correctly:
If you see a bunch of squares, it is your computer, and you need to install the appropriate font files.
If you see a bunch of random ASCII characters, then it is likely that the page encoding is incorrect. In which you can change which encoding to render the page in via browser settings as a temp fix
Very Unlikely Somebody is playing a mean joke and wrote a page using random ASCII characters/squares just to annoy users. :)

Resources