So the way I set up my website is users are redirected to the content page based on the QueryString value.
But the header stays the same.
Problem I am having is the local language characters.
They are not displayed in the content page even though meta-equiv is there when I check the source code.
What may be the problem here? How can I fix it?
Thanks a million..
<%
Section = Request.QueryString("Section")
If Section = "" then
%>
<!-- #Include File="home/index.asp" -->
<%
ElseIf Section = "home" then
%>
<!-- #Include File="home/index.asp" -->
<%
ElseIf Section = "friends" then
%>
Two things you can try
Open your page in Notepad and open the Save As box. What encoding is displayed? If ANSI is selected then change it to UTF-8
Add <%#CODEPAGE="65001"%> at the top of your asp page
Edit - I tried adding the following as a comment but I couldn't format it
You're seeing giriÅŸ instead of giriş
Look at your source code - it contains
<meta http-equiv="Content-Type" content="text/html; charset=windows-1254" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-9">
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
it should contain
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
Related
We have vom .txt dokuments with our email content as HTML code.
Problem is, that we had to add some blank lines so the meta tag is not shown in the mails.
Until now, we had 5 blank lines, but with the Greek mails we need around 20 blank lines for this.
Is there a less ugly solution for this problem?
The affected meta tag:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
The Code in the Document:
Subject:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0," />
<style type="text/css">
//some css
</style>
</head>
//followed by body
Example in Mail:
-equiv="Content-Type" content="text/html; charset=utf-8">
The Mail is displayed as coded after this line.
Can someone please help?
Thank you!
Your message should not display as HTML at all. We can only surmise that adding empty lines somehow exposes a bug in some webmail clients. You should not be relying on this; you should send valid messages. Here is a simple minimal example of a valid HTML email message.
From: you <your.address#example.com>
To: recipient <their.address#example.net>
Subject: whatever you like
Mime-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0," />
<style type="text/css">
//some css
</style>
</head>
//followed by body
I don't think the http-equiv is even necessary any longer, given that the MIME content declaration already sets things up for properly displaying it, but YMMV.
The Content-Transfer-Encoding: 8bit means lines have to be shorter than some 1,000 characters. If that's a problem, maybe employ a different content-transfer-encoding (quoted-printable, perhaps; but then you have to program that, too).
I am trying to create a page which displays the content in a different language how ever the content is displaying as only ??????? on the page.
<html xmlns="http://www.w3.org/1999/xhtml" lang="ar" xml:lang="ar">
<head>
<title>Arabic Quran</title>
<meta name="Author" content="Mustafaa Hanafi"/>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv="Content-language" content="AR"/>
<meta name="Keywords" content="hadith bukhari, sahih Bukhari, the hadith of the prophet, ahadith, ahadees, hadees, hadist, saheeh bukhari, hadist bukhari, the hadith, bukhari hadith"/>
<meta name="Description" content="Sahih bukhari hadith narrations and translation in english, it is one the most authentic collection of hadith, view the hadith by narrator or search"/>
<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
I included this in the meta tag and if my reading on this tag is correct it should make it display the content in Arabic. I will provide a screenshot with my issue below.
for the page Arabic vision of Quran add lang="ar" to the html tag like so
<html lang="ar">
...
</html>
or try this when first connect to your data base : SET CHARACTER SET utf8
$MySQL_Handle = mysqli_connect(HOSTNAME,DATABASE_USERNAME,DATABASE_PASSWORD,DATABASE_NAME)
or die ( mysqli_error($MySQL_Handle) );
$sSQL= 'SET CHARACTER SET utf8';
mysqli_query($MySQL_Handle,$sSQL)
or die ('Can\'t charset in DataBase');
I have written some Gujarati text as follows in html page.
Test Prescribbed/તપાસ કરાવવી
But the browser shows like
Test Prescribed/તપાસ કરાવવી.
Please give the solution
Add request.setCharacterEncoding("utf-8"); to your HTML page.
Actually gujarati fonts are in utf-8 format. If you are using Gujarati then in your html page following line should be there.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
But you should remove other specifications like if you are using jsp page than
<%# page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
line should be removed because you are specifying in meta tag. You need only meta tag.
Add the following line in your HTML.
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
I would like to send out a value in a PHP form like this:
<input type="hidden" name="item_name" value="Car">
And I would like to specify the value is in UTF-8...
What steps do I have to do?
Put this in the header of your page:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
This will tell the browser to submit the characters in UTF-8 encoding.
You'll have to put this in your head-tag:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Add this line of code after the <head> tag:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?= utf8_encode($the_var) ?> should achieve what you need.
I'm using Facebooks' Open Graph protocol :
http://developers.facebook.com/docs/reference/plugins/like/
Here's code for a test page. My understanding is that when someone "likes" this, the image icon that placed in the post on their
page should be the one specified in og:image, and the linkable url in the post should be the one specified in og:url.
In reality, it seems to truncate the URL to the domain, and instead of using the image provided it picks one seemingly at random (my guess is it's just taking the first image it sees from a scan or specified elsewhere in the code).
Am I doing anything obviously wrong here?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>My Site</title>
<meta property="og:title" content="My Site Title" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://www.mysite.org/videos/index/16922653" />
<meta property="og:image" content="http://b.vimeocdn.com/ts/104/367/104367616_200.jpg" />
<meta property="og:site_name" content="My Site" />
<meta property="og:app_id" content="5555555555" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="image_src" href="http://b.vimeocdn.com/ts/104/367/104367616_200.jpg" />
</head>
<body>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like href="http://www.mysite.org/videos/index/16922653" show_faces="false" width="450" />
</body>
</html>
Update: #echese
Good suggestion. Ran it, got this feedback from the "debug" section:
Data Source "website" extracted from <meta property="og:type" />
Data Source "My Site Title" extracted from <meta property="og:title" />
Data Source "http://www.mysite.org/videos/index/16922653" extracted from <meta property="og:url" />
Data Source Extracted 1 values from <meta property="og:image" />: http://b.vimeocdn.com/ts/104/367/104367616_200.jpg
Data Source "My Site" extracted from <meta property="og:site_name" />
Looks like it understands the image url. It suggested some iframe code which I tried but still no dice, I don't get the image I specify.
Try running the URL Linter to see if you can find any errors on your pages.
hmm maybe (maaaaaaybe) it's because you dont have the og namespace on the html tag..
or.. maybe because the image's url is on a different domain than your page?
good luck