6

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>
 &#65231;&#65143;&#65200;&#65142;&#65245;  <br>
 </h1>

 <span id=urdu>
  <P>
&#65207;&#65166;&#65249;&#65146; &#65231;&#65143;&#65250; &#65243;&#64431; 

&#65165;&#65203;&#65147;&#65268;&#65198; &#64424;&#65143;&#65268;&#64415; 

&#64424;&#65143;&#65250; &#65247;&#65262;&#64402;  <br>
&#65203;&#65145;&#65170;&#65186;&#65146; &#65255;&#65143;&#65262; 

&#65243;&#64431; &#65203;&#65143;&#65236;&#65147;&#65268;&#65198; 

&#64424;&#65143;&#65268;&#64415; &#64424;&#65143;&#65250; 

&#65247;&#65262;&#64402;  <br>
  <P>
&#65169;&#65145;&#65184;&#64427; &#64380;&#65145;&#64640; 

&#64424;&#65143;&#64431; &#64380;&#65143;&#65198;&#65165;&#65229; 

&#64404;&#65262; &#65193;&#65146;&#65245; &#64567;  <br>
&#64344;&#64429;&#65147;&#65198; &#65169;&#64429;&#65147;&#64509; 

&#65197;&#65261;&#65207;&#65143;&#65254; 

&#65215;&#65143;&#65252;&#65147;&#65268;&#65198; 

&#64424;&#65143;&#65268;&#64415; &#64424;&#65143;&#65250; 

&#65247;&#65262;&#64402;  <br>
  <P>
&#65267;&#65166;&#65201;&#65262; &#65231;&#65143;&#65250; 

&#65243;&#65147;&#64509; &#64424;&#65143;&#64431; &#64404;&#65143;&#65198; 

&#65243;&#65262;&#65163;&#65147;&#64509; 

&#65239;&#65147;&#65268;&#65252;&#65143;&#65174;  <br>
&#64344;&#64429;&#65147;&#65198; &#65175;&#65262; &#65203;&#65143;&#65168; 

&#65203;&#64431; &#65165;&#65251;&#65147;&#65268;&#65198; 

&#64424;&#65143;&#65268;&#64415; &#64424;&#65143;&#65250; 

&#65247;&#65262;&#64402;  <br>
  <P>
&#65165;&#65267;&#65242; &#65251;&#65143;&#65262;&#64424;&#64472;&#65249; 

&#65203;&#65166; 

&#65175;&#65143;&#65212;&#65143;&#65262;&#65149;&#65144;&#65197; 

&#64424;&#65143;&#65268;&#64415;  <br>
&#65165;&#65267;&#65242; 

&#65251;&#65143;&#65194;&#65149;&#64428;&#65143;&#65250; 

&#65247;&#65143;&#65244;&#65147;&#65268;&#65198; 

&#64424;&#65143;&#65268;&#64415; &#64424;&#65143;&#65250; 

&#65247;&#65262;&#64402;  <br>
  <P>
&#65239;&#65166;&#65175;&#65147;&#65248;&#65262;&#64414; &#65243;&#64431; 

&#65255;&#65143;&#64405;&#65143;&#65198; &#65251;&#65268;&#64415; 

&#65165;&#65163;&#64431; &#65267;&#65166;&#65197;&#65261;  <br>
&#65165;&#64424;&#65246;&#65146; &#65193;&#65146;&#65245; &#65243;&#64431; 

&#65251;&#65145;&#65208;&#65147;&#65268;&#65198; 

&#64424;&#65143;&#65268;&#64415; &#64424;&#65143;&#65250; 

&#65247;&#65262;&#64402;  <br>
  <P>
&#65165;&#65267;&#65242; &#65255;&#65143;&#65224;&#65143;&#65198; 

&#65243;&#65147;&#64509; &#64424;&#65143;&#65252;&#65268;&#64415; 

&#65169;&#64429;&#65147;&#64509; &#65193;&#64430; &#65193;&#65261; 

&#65169;&#64429;&#65147;&#65268;&#65242;  <br>
&#65197;&#65165;&#65257; &#64380;&#65143;&#65248;&#65176;&#64431; 

&#65235;&#65143;&#65240;&#65147;&#65268;&#65198; 

&#64424;&#65143;&#65268;&#64415; &#64424;&#65143;&#65250; 

&#65247;&#65262;&#64402;  <br>
  <P>
&#64344;&#64429;&#65147;&#65198; 

&#65251;&#65147;&#65248;&#65268;&#64405;&#65166; &#65255;&#65143;&#65258; 

&#65203;&#65166;&#65193;&#65257; &#65193;&#65146;&#65245; 

&#64424;&#65143;&#65250; &#65203;&#65166;  <br>
&#65235;&#65147;&#64509; &#65199;&#65142;&#65251;&#65166;&#65255;&#65258; 

&#65255;&#65143;&#65200;&#65146;&#65267;&#65198; 

&#64424;&#65143;&#65268;&#64415; &#64424;&#65143;&#65250; 

&#65247;&#65262;&#64402;  <br>
  <P>
&#65191;&#64472;&#65193; &#64424;&#65143;&#65252;&#65268;&#64415; 

&#65169;&#64429;&#65147;&#64509; &#64424;&#65143;&#64431; 

&#65153;&#65203;&#65198;&#65165; &#65193;&#65142;&#65197;&#64567;&#65197;  

<br>
&#65251;&#65143;&#65174; &#65243;&#65143;&#64425;&#65262; 

&#65193;&#65142;&#65203;&#65176;&#64405;&#65147;&#65268;&#65198; 

&#64424;&#65143;&#65268;&#64415; &#64424;&#65143;&#65250; 

&#65247;&#65262;&#64402;  <br>
  <P>
 &#65199;&#65142;&#65235;&#65143;&#65198; &#65165;&#65251;&#65143;&#65198;  

<br>
 </span>

 </td></tr>
 </table>
 </body>
 </html>

An image is also attached below showing the html page of this code. enter image description here

I have found this way from (U - Trans)

Ali Sajid
  • 3,964
  • 5
  • 18
  • 33

2 Answers2

8

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.

Charbz
  • 536
  • 3
  • 13
  • 1
    if you absolutely insist on using HTML-Entities instead of utf8 text , then there are many methods to convert a string to html entities , depending on if you want to use PHP / Python / Javascript .. etc , there are also online tools that do the conversions for you such as [online unicode converter](http://unicode.online-toolz.com/tools/unicode-html-entities-convertor.php) – Charbz Apr 02 '15 at 21:50
  • 1
    Thanks @charbz it was really helpful, kindly vote the question up if you think its a hidden mystery – Ali Sajid Apr 02 '15 at 23:42
1

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.

Urdu Jini
  • 11
  • 1
  • 2