0

I am using the below script to convert "." into "।" which is the Hindi stop symbol. I am using this code in a blogger post, The script code converts this dot (.) symbol into HTML entity code on blogger post and gives me code like below

।

When I am using pipe | in place of ।, it works perfectly and there is no error. But pipe "|" is not the right symbol for a full stop in Hindi.

Kindly suggest converting "." into "।" that is for a blogger like similar code

Please correct me If I am wrong. I don't have much knowledge of JavaScript and Jquery.

I have used some below code and it works here fine but it did not work on the platform Blogger

Please suggest me the appropriate solution

<!doctype html>
<html dir='ltr' lang='en-GB'>

<head>
  <meta charset="UTF-8">
  <title>test page</title>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
  <script>
    $(function() {
      $('textarea').on("keyup", function(e) {
        var val = $(this).val();
        var str = val.replace('.', '।');
        $(this).val(str);
      });
    });
  </script>
</head>

<body>
  <textarea></textarea>
</body>

</html>
4
  • If you encode to and decode from Base64 you don't lose any characters that can be used and you will support more characters than just '|' without having to add more replaceAll functions. Commented Oct 28, 2021 at 7:59
  • @Emil Karlsson, Please provide the appropriate code Commented Oct 28, 2021 at 8:23
  • 1
    @Emil Karlsson, this Code works Fine to convert '.' into '।'. except Blogger Please suggest the appropriate code, I don't have much knowledge of Coding Commented Oct 28, 2021 at 8:31
  • @H3AR7B3A7, this Code works Fine and also on StackOverflow to convert '.' into '।' except Blogger I have added the code here Please check the link and provide the appropriate code, I don't have much knowledge of Coding Commented Oct 28, 2021 at 8:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.