CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Character coding problem
Pages: [1]

Author Topic: Character coding problem  (Read 1611 times)

magnusl

  • I’m new here
  • *
  • Posts: 27
  • Karma: 2
Character coding problem
March 02, 2009, 09:57:02 am
I have a problem with utf-8 vs iso-8859-1 coding of swedish characters. THis is the situation:

I use the automated subscribe and confirm messages for people signing up for newsletters. In both of these, I have character coding problems (swedish characters misrepresented).

The html subscribe message is
Code: [Select]
<p>Du (eller någon annan) har anmält att du vill få AGSLOs nyhetsmail till denna mailadress. För att bekräfta detta och bli medlem av listan, svara på detta mail (du behöver inte skriva något, bara klicka på svara och skicka), eller <a href="{subscribe.url}">klicka här </a> >/p>

<p>Vill du inte abonnera så gör du ingenting, eller kontakta webmaster@agslo.se.</p>

<p>Webmaster
<br>AGSLO
</p>

In the recieved mail, the following appears in the soure code:

Code: [Select]
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="ISO-8859-1"

I would expect a UTF-8 there, as my message seems to be saved by civimail as utf-8.....or??

I also use a footer and a header in most mailings, formatted in a similar way to the subscribe and confirm messages. And I use an automated opt-out message formatted that way.These show no character coding problems. And in the source code of the mail is

Code: [Select]
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="utf-8"[code]

Why is it utf-8 in some and iso-8859-1 in others...??

Magnus Larsson
confused[/code]

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Character coding problem
March 02, 2009, 01:19:15 pm

this is a bug in 2.1 and 2.2.

i have filed an issue here: http://issues.civicrm.org/jira/browse/CRM-4184

We will fix this for 2.2

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

magnusl

  • I’m new here
  • *
  • Posts: 27
  • Karma: 2
Re: Character coding problem
March 03, 2009, 10:27:59 am
Ok, great!

Meanwhile, is there any workaround? I have tried including a meta tag in the html-message, but it does not help. Any other way?

Magnus

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Character coding problem
March 03, 2009, 11:45:54 am

u can backport the patch from: http://fisheye.civicrm.org/changelog/CiviCRM/branches/v2.2?cs=20124

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

magnusl

  • I’m new here
  • *
  • Posts: 27
  • Karma: 2
Re: Character coding problem
March 06, 2009, 11:07:17 am
Hi again!

Tried backporting by simply downloading the Subscribe.php and Confirm.php and then copy them to the correct folder.

However, it didn't work. After filling in my email in the Subscribe form, and clicking on the Subscribe button, I get a blank page instead of being redirected to the home page. And no mail sent out.

Do I need more files to make it work (just downloaded these two..), or is there something else that I need to check?


Magnus

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Character coding problem
March 06, 2009, 03:56:01 pm

i think there were a few more files involved, including CRM/Utils/Mail.php

if you are not familiar with php/mysql, patching an older version is not recommended. i would consider upgrading

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Character coding problem

This forum was archived on 2017-11-26.