Preeti to Unicode converter code using html, css and javascript

Preeti is a popular Nepali font used for typing Nepali characters on a computer. However, Preeti is not compatible with Unicode, which is the standard encoding system for all modern languages. This means that if you want to share your Nepali text online or use it in any Unicode-based software, you need to convert the Preeti text to Unicode.

A Preeti to Unicode Converter is a tool that can help you convert Preeti text into Unicode text. This tool uses a mapping of Preeti characters to their Unicode equivalents to convert the text. The mapping is essentially a table that matches each Preeti character to its corresponding Unicode character.

To use a Preeti to Unicode Converter, you simply need to copy and paste your Preeti text into the tool's input field and click a button to convert it to Unicode. The output will be displayed in another field, and you can copy and paste the Unicode text wherever you need it.

Here's an example code snippet for a Preeti to Unicode converter using HTML, CSS, and JavaScript:

(code starts)

<!DOCTYPE html>
<title>Preeti to Unicode Converter</title>
<meta charset="UTF-8">
body {
font-family: sans-serif;

h1 {
text-align: center;

textarea {
width: 100%;
height: 200px;
margin-bottom: 10px;
resize: none;
padding: 5px;
box-sizing: border-box;

button {
display: block;
margin: 0 auto;
padding: 10px 20px;
font-size: 16px;
background-color: #4CAF50;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;

button:hover {
background-color: #3e8e41;

#unicode-text {
color: #333;
background-color: #f5f5f5;
<h1>Preeti to Unicode Converter</h1>
<textarea id="preeti-text" placeholder="Enter Preeti text here"></textarea>
<button id="convert-btn">Convert to Unicode</button>
<textarea id="unicode-text" placeholder="Unicode text will appear here" readonly></textarea>

const preetiUnicodeMap = {
"क": "क",
"ख": "ख",
"ग": "ग",
"घ": "घ",
"ङ": "ङ",
"च": "च",
"छ": "छ",
"ज": "ज",
"झ": "झ",
"ञ": "ञ",
"ट": "ट",
"ठ": "ठ",
"ड": "ड",
"ढ": "ढ",
"ण": "ण",
"त": "त",
"थ": "थ",
"द": "द",
"ध": "ध",
"न": "न",
"प": "प",
"फ": "फ",
"ब": "ब",
"भ": "भ",
"म": "म",
"य": "य",
"र": "र",
"ल": "ल",
"व": "व",
"श": "श",
"ष": "ष",
"स": "स",
"ह": "ह",
"ा": "ा",
"ि": "ि",
"ी": "ी",
"ु": "ु",
"ू": "ू",
"े": "े",
"ै": "ै",
"ो": "ो",
"ौ": "ौ",
"ं": "ं",
"ँ": "ँ",
"ः": "ः",
"ॅ": "ॅ",
"ॉ": "ॉ",
"़": "

(code ends)

Post a Comment