SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: Char Encoding
-
Jul 12, 2009, 18:53 #1
- Join Date
- Jul 2008
- Posts
- 190
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Char Encoding
I've got a Joomla/CiviCRM set-up that I'm making some changes to using PHP and MySQL, however am having one problem with char encoding. When CiviCRM is saving data it's saving it as Submitted in MySQL. This wouldn't be a problem, but I need this to display simply as 'Submitted' in my coding. The database uses utf8_unicode_ci and CiviCRM runs on utf8 so I don't know why it writes it to the database like this, and I've not been able to get much help on this at te CiviCRM forum. However, does anyone know how I could take what's in the database and have it displayed without any extra characters using a simple PHP query?
Many thanks,
Russ
-
Jul 12, 2009, 19:29 #2
- Join Date
- Jul 2008
- Posts
- 5,757
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
My guess is you're the one adding the whitespace around the word.
But, see trim()
-
Jul 13, 2009, 05:55 #3
- Join Date
- Jul 2008
- Posts
- 190
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks for the tip, I'll give trim a try. I do want to say that it's definately not me adding the whitespace around the entries. If I edit the entry manually in phpMyAdmin so that it has no whitespace and then go back to CiviCRM and make an alteration to that entry it will save it with the whitespace, so I know that itīs definately not me! I will let you know how the trim function works out though.
Thanks
Russ
Bookmarks