Maintaining unicode content through mailto link...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • theaj
    New Member
    • Nov 2008
    • 18

    Maintaining unicode content through mailto link...

    Hi all,
    I am trying to pass unicode data through mailto links. The problems is, it gets garbled and does not appear in Outlook window in its proper format and instead takes weird chinese characters form. Can anyone tell me how to overcome this ?

    Thanks in advance.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Use the encodeURICompon ent function.

    Comment

    • theaj
      New Member
      • Nov 2008
      • 18

      #3
      Originally posted by acoder
      Use the encodeURICompon ent function.
      thanx for the reply...but

      encodeURICompon ent will give me the string i want to encode, into encoded uri format. But what i want is not this.

      I have already encoded my data in that form. It is the unicode content in that data which when taken to E-mail client, gets garbled. I want to maintain that unicode information.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Give me an example of unicode content. Also, is this mailto link being dynamically generated or is it already there in HTML code when the page loads?

        Comment

        • theaj
          New Member
          • Nov 2008
          • 18

          #5
          Originally posted by acoder
          Give me an example of unicode content. Also, is this mailto link being dynamically generated or is it already there in HTML code when the page loads?
          By unicode content I mean, I have some data in Devnagari Script which is in range u0901 to u097f.

          And yes this mailto link i have generated dynamically generated in the javascript. This data is not there when page loads.

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            Check that Outlook is set to support Unicode characters.

            Can you post the code that you're working with.

            Comment

            • theaj
              New Member
              • Nov 2008
              • 18

              #7
              This is the input i give,
              किताब पुणे
              and this goes through a function in javascript which modifies the href by appending this string at the end as a subject of mail.

              And what actually gets appended is given below as seen in outlook..
              à¤.िताब पुणà¥?.

              My Outlook does support unicode because if this text (किताब पुणे) is directly pasted in outlook, it gets rendered as it is.

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #8
                Have you tried other mail readers?

                You may also need to check your browser settings to see if it uses unicode for mailto links.

                Comment

                • theaj
                  New Member
                  • Nov 2008
                  • 18

                  #9
                  I have just tried on outlook yet...but yes my browsers settings are configured to use utf-8 for mailto links. Still the problem persists....

                  Its the medium through which the data is transferred from browser to outlook which is garbling my unicode data...

                  Comment

                  • acoder
                    Recognized Expert MVP
                    • Nov 2006
                    • 16032

                    #10
                    Well, try another email client to find out whether it's a browser issue or an Outlook problem.

                    Comment

                    • theaj
                      New Member
                      • Nov 2008
                      • 18

                      #11
                      I tested the thunderbird for it and the unicode text gets rendered correctly. Though my outlook is using default encoding as Unicode it is garbling the data.

                      Comment

                      • acoder
                        Recognized Expert MVP
                        • Nov 2006
                        • 16032

                        #12
                        Then it's not a browser or JavaScript problem really. It's an email client problem, specifically Outlook. You may need to check some help files/documentation or ask in a dedicated Outlook help-list, or, better still, use a better email client, or even better still, don't use mailto. Use a form and use server-side code to send email.

                        Comment

                        • theaj
                          New Member
                          • Nov 2008
                          • 18

                          #13
                          thanks acoder...ur inputs were really valuable.

                          Comment

                          • acoder
                            Recognized Expert MVP
                            • Nov 2006
                            • 16032

                            #14
                            You're welcome. Did you manage to solve your problem in the end?

                            Comment

                            • theaj
                              New Member
                              • Nov 2008
                              • 18

                              #15
                              I am trying to do so with the help of ASP but it is not working.
                              I have posted the problem im gettin in ASP in ASP forum. The link is given below...



                              so far no responses....ca n u help ?

                              Comment

                              Working...