# Unicode to Krutidev mapping
unicode_to_krutidev = {
'क': 'd', 'ख': 'D', 'ग': '[', 'घ': ']', 'ङ': 'Å',
'च': 't', 'छ': 'T', 'ज': 'y', 'झ': 'Y', 'ञ': 'u',
'ट': 'U', 'ठ': 'i', 'ड': 'I', 'ढ': 'o', 'ण': 'O',
'त': 'p', 'थ': 'P', 'द': 's', 'ध': 'S', 'न': 'a',
'प': 'f', 'फ': 'F', 'ब': 'g', 'भ': 'G', 'म': 'h',
'य': 'j', 'र': 'J', 'ल': 'k', 'व': 'K', 'श': 'l',
'ष': 'L', 'स': ';', 'ह': '\'', 'ळ': '\\', 'क्ष': '|',
'ज्ञ': '}', 'त्र': '{', 'श्र': ':', 'अ': 'c', 'आ': 'C',
'इ': 'e', 'ई': 'E', 'उ': 'v', 'ऊ': 'V', 'ऋ': 'r',
'ए': 'b', 'ऐ': 'B', 'ओ': 'n', 'औ': 'N', 'ं': 'M',
'ः': 'H', '़': '`', 'ा': 'q', 'ि': 'w', 'ी': 'W',
'ु': 'x', 'ू': 'X', 'ृ': 'R', 'े': 'z', 'ै': 'Z',
'ो': 'm', 'ौ': 'Q', '्': 'A', '।': '^', '॥': '&',
'०': '0', '१': '1', '२': '2', '३': '3', '४': '4',
'५': '5', '६': '6', '७': '7', '८': '8', '९': '9',
' ': ' '
}
def unicode_to_krutidev_converter(text):
converted_text = []
for char in text:
if char in unicode_to_krutidev:
converted_text.append(unicode_to_krutidev[char])
else:
converted_text.append(char) # Keep the character as is if not in mapping
return ''.join(converted_text)
# Example usage
unicode_text = "कृपया इस टेक्स्ट को कृतिदेव में बदलें।"
krutidev_text = unicode_to_krutidev_converter(unicode_text)
print(krutidev_text)