UTF-8 and javascript...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • garrah mohammed
    New Member
    • Apr 2011
    • 4

    UTF-8 and javascript...

    hey everyone...
    i am having some problem with utf-8 when i use it in javascript... the problem is that i am using utf-8 for arabic language in javascript, but when i enter anything it is converted to utf-8 code (mirror image)and when i output it... it is output as the code but not the character or the letters i have entered... can you please help me... thank you in advanced...
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    hmmm ... could you explain that a bit more? basically you should have all your files (js/html) utf-8 encoded and the html-document could have the charset set explicitly to utf-8 - then no problems should occur ... but without more information it is difficult to give more specific hints.

    kind regards

    Comment

    • garrah mohammed
      New Member
      • Apr 2011
      • 4

      #3
      hey gits...

      well i am trying to delevop a webpage that will provide encryption and decryption for arabic text... however, as it is know arabic words are written attached (linked)... that is why i am using utf-8 while inputting a text and incryptiong it or decrypting it... however, when i input anything it is directly translated into the mirror image of it and the output is the same!!??

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5390

        #4
        i think i don't understand that right ... could you show an example?

        kind regards

        Comment

        • garrah mohammed
          New Member
          • Apr 2011
          • 4

          #5
          i dont know how to explain it but i will do my best... well the idea of encryption is to change letters of the message and decrytion is setting it to its real form... for example... jack becomes kjhg in encyrption and became agan jack after decryption... now i am trying to apply this to arabic words and texts... and i dont kno how to do it... for arabic...

          Comment

          • gits
            Recognized Expert Moderator Expert
            • May 2007
            • 5390

            #6
            so you want to do that on a single page with JavaScript only for a usecase only? nothing is transfered to the server and back during those operations?

            Comment

            • garrah mohammed
              New Member
              • Apr 2011
              • 4

              #7
              yes thats right... i want to do that on a single page with no server interfere at all... and using javascript...
              and i really appreciate your help... thanks alot...

              Comment

              Working...