| Author |  | 
      
        | raindm Groupie
 
  
  
 Joined: 31 January 2008
 Location: Israel
 Online Status: Offline
 Posts: 44
 | 
          Hello
           | Posted: 13 December 2009 at 5:27am | IP Logged |   |  
           | 
 |  
 I am trying to send a Japanese email..
 The content shows correctly..
 but the Subject and from email name looks like this: "振込みで全"
 You might see this correctly here, but it looks like numbers and  ..special characters i believe.
 
 
 I am  using         & nbsp;    objMailer.Message.Charset  = "utf-8"; before populating the content/email subject/ from name
 
 Should i use other encoding? is there any other solution i should know of?
 
 Thank you,
 Dror
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Igor AfterLogic Support
 
  
 
 Joined: 24 June 2008
 Location: United States
 Online Status: Offline
 Posts: 6168
 | 
          We suggest using MailMessage.EncodeAllHeaders method. For the 2nd parameter, specifying HeaderEncodingOptions.None (which means using default Quoted-Printable encoding) should be fine in most cases.
           | Posted: 14 December 2009 at 1:54am | IP Logged |   |  
           | 
 |  
 --
 Regards,
 Igor, AfterLogic Support
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | raindm Groupie
 
  
  
 Joined: 31 January 2008
 Location: Israel
 Online Status: Offline
 Posts: 44
 | 
          Hi
           | Posted: 15 December 2009 at 6:14am | IP Logged |   |  
           | 
 |  
 i tried this and it still shows me the the strange like ಪ characters in the subject.
 
 I read this  http://stackoverflow.com/questions/419977/japanese-email-sub ject-encoding
 
 but even after trying the suggestions i couldn't make it work correctly..
 i even tried:   smtp.Subject = "=?ISO-2022-JP?B?" + emailData.Subject + "?=";
 which shows some Japanese character but not like the original i wanted to send..
 
 If you have any workaround this i would greatly appreciate it.
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Alex AfterLogic Support
 
  
  
 Joined: 19 November 2003
 Online Status: Offline
 Posts: 2207
 | 
          First of all, how do you know the Japanese text is correct when you place it into .Subject property? I.e. how do you know the text wasn't ruined earlier?
           | Posted: 15 December 2009 at 6:39am | IP Logged |   |  
           | 
 |  
 Also, how does it appear the body (in contrast to headers) is rendered properly? Do you use HTML encoding there (so that Japanese characters appear as  sequences there)?
 
 Regards,
 Alex
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | raindm Groupie
 
  
  
 Joined: 31 January 2008
 Location: Israel
 Online Status: Offline
 Posts: 44
 | 
          Hi Alex
           | Posted: 16 December 2009 at 1:33am | IP Logged |   |  
           | 
 |  
 I know how the original Japanese text looks like So when i send it by email it looks different with strange characters also so i know it changed. If i take the  and copy paste it into google it translate it to the correctly Japanese characters so  i know it is correct.
 
 
 In the body it does have  sequence for Japanese character however it is rendered correctly. (We use HTML body)
 Just the subject and From Email Name doesn't render correctly.
 
 I read that-
 "Also, your subject line should not exceed 75 characters per line. That is, 75 characters after you've encoded in ISO-2022-JP and base64"
 
 It seems that when doing :
 " smtp.Message.EncodeAllHeaders(Encoding.UTF8, HeaderEncodingOptions.Base64);"
 
 It doesn't change the  to Base64 which might be the issue here..
 
 I looks at Japanese email i received from other source and it seems the subject is Base64, in my case it doesn't convert the  to Base64.
 This is just something i suspect, but i am not sure it is the issue.
 
 Thank you,
 Dror
 
 
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Igor AfterLogic Support
 
  
 
 Joined: 24 June 2008
 Location: United States
 Online Status: Offline
 Posts: 6168
 | 
          If you have Japanese characters encoded with ..., that's not actually text but HTML encoding, it cannot be converted, and cannot be normally displayed in message subject. You should supply plaintext (not HTML-encoded) Japanese characters and encode them using EncodeAllHeaders method.
           | Posted: 16 December 2009 at 5:53am | IP Logged |   |  
           | 
 |  
 --
 Regards,
 Igor, AfterLogic Support
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | raindm Groupie
 
  
  
 Joined: 31 January 2008
 Location: Israel
 Online Status: Offline
 Posts: 44
 | 
          Hi Igor,
           | Posted: 16 December 2009 at 7:27am | IP Logged |   |  
           | 
 |  
 It seems that the information is save with HTML encoding into my database (mssql)
 
 Is there a way to decode the characters?
 
 
 
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Igor AfterLogic Support
 
  
 
 Joined: 24 June 2008
 Location: United States
 Online Status: Offline
 Posts: 6168
 | 
          Try using HttpUtility.HtmlDecode method for this.
           | Posted: 16 December 2009 at 7:54am | IP Logged |   |  
           | 
 |  
 --
 Regards,
 Igor, AfterLogic Support
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | seraulu1 Newbie
 
  
  
 Joined: 12 February 2010
 Location: United States
 Online Status: Offline
 Posts: 1
 | 
          Good suggestion thanks for that
           | Posted: 12 February 2010 at 11:01pm | IP Logged |   |  
           | 
 |    | 
       
        | Back to Top |     | 
       
       
        |  |