Hey everyone, I wanted to ask you if someone can explain how the CkEmail does handle the charset for the function LoadEML().
I need to load my created eml-file from the path "f:\tester öffentlich.eml "
The Output Shows an ANSI error! So it does Interpret the word "öffentlich" as "ffentlich" and Fails to load it.
Is there a way to load an EML even with this special german chars? Without the special char/ vowel in the filename it works. Just want to make sure it is not a bug and maybe I am doing something wrong on my end?
Output for lastErrorText as follows:
If you hard-coded the filename as a literal string within your C++ source code, it was probably saved in the ANSI charset. Therefore, when the string is passed to LoadEml, you are passing ANSI chars. You would not want to set the "Utf8" property equal to true. The Utf8 property tells the Chilkat object instance how it should interpret any "const char " parameters passed by the app -- as either ANSI or utf-8. (it also controls the charset of any "const char " lowercase alternative method/property return values)
The email object's Charset property controls the charset to be used when rendering the email to MIME, such as when sending email or saving to .eml. It is not related to the interpretation of "const char *" method args.
answered Sep 11 '14 at 22:26
Thank you. I might have my solution by doing it this way (changing put_Utf8() from case to case in the very same function):
answered Sep 12 '14 at 04:49
I don't think you are clearly understanding the meaning and purpose of the "Utf8" property (i.e. get_Utf8(), put_Utf8())
A "const char *" in C/C++ is a sequence of bytes terminated by a null byte. The Utf8 property tells Chilkat how to interpret the bytes -- as characters represented in the utf-8 encoding, or as characters represented in the ANSI encoding. The Utf8 property is only concerned with the passing of "const char *" arguments and making sure the bytes are interpreted correctly. Therefore, the "Utf8" property is common to all Chilkat C++ classes.