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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Currency symbols still messed up in 4.5.0
Pages: [1]

Author Topic: Currency symbols still messed up in 4.5.0  (Read 740 times)

tv2011

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
  • CiviCRM version: 4.5
  • CMS version: Drupal
  • MySQL version: 5
  • PHP version: 5
Currency symbols still messed up in 4.5.0
October 06, 2014, 11:38:05 am
From previous searches on this topic I was hoping that broken currency symbols were going to be fixed in 4.5.0. However, having upgraded from 4.4.6 -> 4.5.0 I am still seeing this problem. Can I fix it myself?

Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: Currency symbols still messed up in 4.5.0
October 06, 2014, 03:47:39 pm
This is not something that is reproducible on the demo site, nor have I seen it on any of the production sites I have worked on.  My guess is it might be a character set misconfiguration on the server or database server.
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

tv2011

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
  • CiviCRM version: 4.5
  • CMS version: Drupal
  • MySQL version: 5
  • PHP version: 5
Re: Currency symbols still messed up in 4.5.0
October 07, 2014, 01:24:56 am
I've been able to fix it by manually editing the database. It's simple enough as I only need the GBP symbol to work properly - I guess the upgrade script doesn't fix the currency table?

Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: Currency symbols still messed up in 4.5.0
October 07, 2014, 04:42:22 am
Glad to hear it was an easy fix.  I have never had broken currency symbols on a site, even ones that I upgraded from 3.4.8, so I don't think this is a standard problem that would need to be addressed by the upgrade scripts.  I'm not sure why yours broke, that is a bit odd.
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Currency symbols still messed up in 4.5.0
October 09, 2014, 07:08:24 am
Hey there,

I think things like that can happen when you do a mysqldump and import and the text goes through a format that doesn't like funny currency symbols, hence a manual edit / reset of that DB table is probably the way to go here. Any pointers on how you did that would probably be useful for others.

Michael
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

tv2011

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
  • CiviCRM version: 4.5
  • CMS version: Drupal
  • MySQL version: 5
  • PHP version: 5
Re: Currency symbols still messed up in 4.5.0
October 09, 2014, 08:08:14 am
Nothing fancy - just edited the table using phpmyadmin. Since I only worried about GBP/£, that was the only row that I edited. I guess if I had to do many more currencies than that I'd have to do something more clever.

David Hepper

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.32
  • MySQL version: 5.5
  • PHP version: 5.4
Re: Currency symbols still messed up in 4.5.0
November 03, 2014, 04:02:52 am
My client has this problem, too. We tried to patch the SQL for this (and other currencies) but were only partly successful. My concern is that this was a clean install of 4.4.3 on Drupal 7 following the full procedure and if we don't know why it occurred it can happen again to anyone. It affects all multi-byte characters in the system, though the only one that has affected this particular implementation is the Pound Sign.

My tentative explanation, using the problem with Pound Sign (£) as an example, is this:
- Pound Sign in hexadecimal is U+00A3.
- The unwanted character that is seen prefixing the Pound Sign is  (known as "Latin Capital Letter A With Circumflex") = U+00C2.
- The UTF-8 coding / mapping for Pound Sign alone is a two-byte sequence: C2-A3.
- This exact problem is discussed succinctly in this Unicode.org article > http://www.unicode.org/mail-arch/unicode-ml/y2009-m06/0069.html and also in the Wikipedia article at http://en.wikipedia.org/wiki/UTF-8 in the section headed Invalid byte sequences. Unfortunately, the Wikipedia article causes me to glaze over at about paragraph 3.

Somewhere along the installation process UTF-8 has been interpreted incorrectly as ISO-8859-1 or similar and C2-A3 has been interpreted at U+00C2 followed by U+00A3. This does not explain what we did wrong during the installation process, of whether there is a fault in the procedure.
We now have a very large number of these symbols in the system and would appreciate suggestions for a reliable way to fix them comprehensively.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Currency symbols still messed up in 4.5.0
November 03, 2014, 07:51:46 am
It is likely your mysql configuration assumed latin1 as default instead of utf8 when you did the initial install. Now civi specify the encoding and don't rely on the default, so it should works fine for a new install, but obviously doesn't fix it automatically for existing install that you upgrade.

If the problem is only on the currency, you can run several UPGRADE sql commands
https://raw.githubusercontent.com/civicrm/civicrm-core/master/sql/civicrm_generated.mysql

eg. (untested)
Code: [Select]
SET character_set_client = 'utf8', character_set_connection = 'utf8'";
UPGRADE `civicrm_currency` set symbol='€' where name='EUR';
...
If you can get a complete list, could you paste it here for those that have the same problem?
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Currency symbols still messed up in 4.5.0

This forum was archived on 2017-11-26.