Benoit Posted November 26, 2018 Report Share Posted November 26, 2018 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 Quote Link to comment
JKSH Posted November 26, 2018 Report Share Posted November 26, 2018 (edited) 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 November 26, 2018 by JKSH Quote Link to comment
Benoit Posted November 26, 2018 Author Report Share Posted November 26, 2018 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 Quote Link to comment
JKSH Posted November 26, 2018 Report Share Posted November 26, 2018 (edited) First, how do you input the Asian characters into your program? Edited November 26, 2018 by JKSH Quote Link to comment
Benoit Posted November 26, 2018 Author Report Share Posted November 26, 2018 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 Quote Link to comment
Benoit Posted November 26, 2018 Author Report Share Posted November 26, 2018 Should it looks like this? Quote Link to comment
JKSH Posted November 26, 2018 Report Share Posted November 26, 2018 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) Quote Link to comment
Benoit Posted November 26, 2018 Author Report Share Posted November 26, 2018 Thanks for your help. I'll try some stuff on my side as well. Benoit Quote Link to comment
Benoit Posted November 26, 2018 Author Report Share Posted November 26, 2018 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 2 Quote Link to comment
JKSH Posted November 27, 2018 Report Share Posted November 27, 2018 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! 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.