Jump to content
News about the LabVIEW Wiki! Read more... ×
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

Thanks for your help. I'll try some stuff on my side as well.

Benoit

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

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