Encoding problem with fr-CA-DefaultOrderConfirmationPlainTextEmailTemplate.config

This is a place to discuss how to adapt mojoPortal to the needs of different cultures. Before asking questions here please first review the localization documentation.

This thread is closed to new posts. You must sign in to post in the forums.
3/4/2013 10:06:40 PM
Gravatar
Total Posts 7

Encoding problem with fr-CA-DefaultOrderConfirmationPlainTextEmailTemplate.config

Hi,

The order confirmation email is ignoring accents "é" and just pass it as "e". The email subject who contains also an "é" is fine and render as an "é". 

I tried to solve the problem with <add key="SmtpPreferredEncoding" value="utf-8"/> and tried also "UTF-8",  "iso-8859-1" and "ISO-8859-1" but it is always the same, I also checked the .config file and encode it in the same value.

I also test with another smtp server to see if that was the cause, but it is exactly the same problem.

Recover the password who contains accents is fine and pass them as it is in the .config file.

The contact form too, no problem.

I hope somebody can give me another tips or way to handle that.

Regards

Mathias 

3/5/2013 1:22:03 PM
Gravatar
Total Posts 18444

Re: Encoding problem with fr-CA-DefaultOrderConfirmationPlainTextEmailTemplate.config

Hi Mathias,

I notice that the file fr-CA-DefaultOrderConfirmationPlainTextEmailTemplate.config is encoded as utf8 without BOM

Possibly in the context of smtp messages it is not detecting the encoding correctly, changing it to utf-8 with BOM using a text editor like Notepad++ might solve it, I would try that since you say other messages such as contact form are being sent correctly. With BOM just adds some bytes to the beginning of the file that make it easier to sniff/detect the encoding, without that it may be seeing the file as ansi and losing some of the chars.

If you find that works let me know and I will change the encoding format of that file here.

Hope that helps,

Joe

3/7/2013 10:35:51 PM
Gravatar
Total Posts 7

Re: Encoding problem with fr-CA-DefaultOrderConfirmationPlainTextEmailTemplate.config

Hi Joe,

Thank you for your advice. Unfortunately it's not working. I followed your instruction and used notepad++ as always and It's the same problem.

It appears that when I forced the encoding with <add key="SmtpPreferredEncoding" value="Windows-1252"/> or another value that the template for the subject and the template for the plain text are not encoded the same way. With "Windows-1252" the subject is encoded in Windows-1252 and the plain text is treated as iso-8859-1.

Additional test with other specials char ç -> c and the € disappears.

It will be nice if someone can run a test with an order confirmation email forcing CA-fr or other language with specials chars to see it's only my problem !

Or someone have another advice to resolve my issue.

Regards

Mathias

3/8/2013 2:57:20 PM
Gravatar
Total Posts 18444

Re: Encoding problem with fr-CA-DefaultOrderConfirmationPlainTextEmailTemplate.config

Hi Mathias,

Thanks for the beers! Much appreciated.

I will look into this problem further and see what I can figure out. I do know that in the past others have been able to use other language encodings. It could possibly be a problem at the mail server rather than in mojoPortal but I will see what I can figure out with some testing.

Best,

Joe

3/12/2013 12:23:00 PM
Gravatar
Total Posts 18444

Re: Encoding problem with fr-CA-DefaultOrderConfirmationPlainTextEmailTemplate.config

Hi Mathias,

I was able to reproduce this problem on my local machine and fix it. It was a bug in the webstore code that was forcing the text to ascii, it was not a problem with the smtp encoding.

This is fixed now in the source code repository so it will be fixed in the next release of mojoPortal.

Thanks

Joe

3/14/2013 1:48:28 PM
Gravatar
Total Posts 18444

Re: Encoding problem with fr-CA-DefaultOrderConfirmationPlainTextEmailTemplate.config

Hi Mathias,

I have patched the 2.3.9.6 release with the fix for this problem. See the notes on the codeplex download page about which files were updated.

Hope that helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.