Reputation: 4329
I want to make a website in urdu, I have googled it and found some unicode method, Now what my question is that how these unicodes are working or how can I extract these codes from the urdu sentences.
Following is the code snippet which is used to display the urdu in the website.
<HTML>
<HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<TITLE>Ghazal</TITLE>
<STYLE TYPE="text/css"><!--
H1 {
color: #007c78;
font-family: "Urdu Nastaliq Unicode";
font-size: 60px; }
#urdu {
font-family: "Urdu Nastaliq Unicode";
font-size: 32px; }
}
--></STYLE>
</HEAD>
<BODY bgcolor="#ffffff">
<bdo dir=rtl>
<center>
<table border=0>
<tr><td align=right>
<h1 align=right>
ﻏﹷﺰﹶﻝ <br>
</h1>
<span id=urdu>
<P>
ﺷﺎﻡﹺ ﻏﹷﻢ ﻛﮯ
ﺍﺳﹻﻴﺮ ﮨﹷﻴﮟ
ﮨﹷﻢ ﻟﻮﮒ <br>
ﺳﹹﺒﺢﹺ ﻧﹷﻮ
ﻛﮯ ﺳﹷﻔﹻﻴﺮ
ﮨﹷﻴﮟ ﮨﹷﻢ
ﻟﻮﮒ <br>
<P>
ﺑﹹﺠﮫ ﭼﹹﲀ
ﮨﹷﮯ ﭼﹷﺮﺍﻍ
ﮔﻮ ﺩﹺﻝ ﰷ <br>
ﭘﮭﹻﺮ ﺑﮭﹻﯽ
ﺭﻭﺷﹷﻦ
ﺿﹷﻤﹻﻴﺮ
ﮨﹷﻴﮟ ﮨﹷﻢ
ﻟﻮﮒ <br>
<P>
ﻳﺎﺱﻮ ﻏﹷﻢ
ﻛﹻﯽ ﮨﹷﮯ ﮔﹷﺮ
ﻛﻮﺋﹻﯽ
ﻗﹻﻴﻤﹷﺖ <br>
ﭘﮭﹻﺮ ﺗﻮ ﺳﹷﺐ
ﺳﮯ ﺍﻣﹻﻴﺮ
ﮨﹷﻴﮟ ﮨﹷﻢ
ﻟﻮﮒ <br>
<P>
ﺍﻳﻚ ﻣﹷﻮﮨﯘﻡ
ﺳﺎ
ﺗﹷﺼﹷﻮﹽﹸﺭ
ﮨﹷﻴﮟ <br>
ﺍﻳﻚ
ﻣﹷﺪﹽﮬﹷﻢ
ﻟﹷﻜﹻﻴﺮ
ﮨﹷﻴﮟ ﮨﹷﻢ
ﻟﻮﮒ <br>
<P>
ﻗﺎﺗﹻﻠﻮﮞ ﻛﮯ
ﻧﹷﮕﹷﺮ ﻣﻴﮟ
ﺍﺋﮯ ﻳﺎﺭﻭ <br>
ﺍﮨﻞﹺ ﺩﹺﻝ ﻛﮯ
ﻣﹹﺸﹻﻴﺮ
ﮨﹷﻴﮟ ﮨﹷﻢ
ﻟﻮﮒ <br>
<P>
ﺍﻳﻚ ﻧﹷﻈﹷﺮ
ﻛﹻﯽ ﮨﹷﻤﻴﮟ
ﺑﮭﹻﯽ ﺩﮮ ﺩﻭ
ﺑﮭﹻﻴﻚ <br>
ﺭﺍﻩ ﭼﹷﻠﺘﮯ
ﻓﹷﻘﹻﻴﺮ
ﮨﹷﻴﮟ ﮨﹷﻢ
ﻟﻮﮒ <br>
<P>
ﭘﮭﹻﺮ
ﻣﹻﻠﻴﮕﺎ ﻧﹷﻪ
ﺳﺎﺩﻩ ﺩﹺﻝ
ﮨﹷﻢ ﺳﺎ <br>
ﻓﹻﯽ ﺯﹶﻣﺎﻧﻪ
ﻧﹷﺰﹺﻳﺮ
ﮨﹷﻴﮟ ﮨﹷﻢ
ﻟﻮﮒ <br>
<P>
ﺧﯘﺩ ﮨﹷﻤﻴﮟ
ﺑﮭﹻﯽ ﮨﹷﮯ
ﺁﺳﺮﺍ ﺩﹶﺭﰷﺭ
<br>
ﻣﹷﺖ ﻛﹷﮩﻮ
ﺩﹶﺳﺘﮕﹻﻴﺮ
ﮨﹷﻴﮟ ﮨﹷﻢ
ﻟﻮﮒ <br>
<P>
ﺯﹶﻓﹷﺮ ﺍﻣﹷﺮ
<br>
</span>
</td></tr>
</table>
</body>
</html>
An image is also attached below showing the html page of this code.
I have found this way from (U - Trans)
Upvotes: 6
Views: 14385
Reputation: 11
You can use "Urdu Nigar Unicode" software to write Urdu and copy the text then paste on your favorite web / html editor. Save it and voila you will have an Urdu Web Page.
Upvotes: 1
Reputation: 536
the characters you are seeing are not Unicode, they are HTML Entities representing Unicode characters.
Your code doesn't need to have those characters to display the Urdu. All you need, is the charset meta tag that you have in the <head>
section
<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
if you are using a modern text editor , like Brackets.io or Sublime, you can directly enter the urdu text in your code, provided that you are saving your html files with UTF-8 Encoding.
Upvotes: 8