Jump to content
Benoit

Send email with Thai/ Chinese / Japanese character

Recommended Posts

Hi everyone,

I am trying to send email in LabVIEW with Asian character.

No matter what I try, only the standard character are sent.

Is anyone succeed in this?

Thanks

Benoit

 

Share this post


Link to post
Share on other sites
15 minutes ago, Benoit said:

I am trying to send email in LabVIEW with Asian character.

What encoding do you use for those characters? LabVIEW's email VIs send emails assuming the UTF-8 encoding (http://zone.ni.com/reference/en-XX/help/371361P-01/lvcomm/smtp_client/ ); you might need to encode your Asian characters in UTF-8 first.

I haven't tried this myself, but you could also try calling the Set Headers VI (http://zone.ni.com/reference/en-XX/help/371361P-01/lvcomm/smtp_set_headers/ ) and set the Content-Type header to match your non-UTF-8 encoding (https://www.emailonacid.com/blog/article/email-development/the_importance_of_content-type_character_encoding_in_html_emails/ ).

Edited by JKSH

Share this post


Link to post
Share on other sites

I am actually trying to figure out how to use the exact information you proposed to me.

Did you ever succeed? If yes, do you have an example?

i think the formatting of the array with the information to write as input is the problem I have.

Benoit

Share this post


Link to post
Share on other sites

First, how do you input the Asian characters into your program?

Edited by JKSH

Share this post


Link to post
Share on other sites

Two way. User input or from files.

I see per example in Hex 4 character in Thai...

1E0E 1E0E 310E 1E0E = พพัพ

How do I send that by email in HTML or even by plain text.

Thanks

Benoit

Share this post


Link to post
Share on other sites

I just did a quick test. It looks like LabVIEW assumes that the email text is encoded in your PC's default 8-bit encoding. Then, LabVIEW automatically tries to convert the text to UTF-8.

I think this means the only way to send Japanese emails through LabVIEW is to configure your whole PC to use Japanese 8-bit encoding and/or use the Japanese version of LabVIEW. :(

(I'll have to leave for now, sorry. I'll try some more tests tonight to see if anything else works)

 

Share this post


Link to post
Share on other sites

Well after some research, this is what i came to.

Sending the email in html format with the following VI to transform Unicode from LabVIEW to HTML character.

I think it will work in most of the case.

Benoit

PS: Thanks for your help.

Unicode to html.vi

  • Like 2

Share this post


Link to post
Share on other sites
16 hours ago, Benoit said:

Sending the email in html format with the following VI to transform Unicode from LabVIEW to HTML character.

I think it will work in most of the case.

Yes, that sounds like a solid solution. Good thinking, and congrats!

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.