PHP, € and EE
Posted: 12 October 2007 02:24 PM   [ Ignore ]  
Summer Student
Total Posts:  11
Joined  10-11-2007

I’m getting strange symbols whenever I try and echo the Euro symbol (€) from PHP (in a plugin) it displays as garbage, yet it works fine in EE.  Would this have something to do with the default characterset in php.ini, and if so, why doesn’t it effect EE (which I assumed, also uses PHP to render the templates…)

I wrote the plugin myself, and it just uses $r=”€” . $some_variable) and then returns it at the end of the function.

rather, here is a shortened example of what I’m doing:

function for_class() // would be EE tag exp:classname:for_class
{
  $r=$r . ” some stuff to be displayed in the template”;
  $r=$r . “€” . $this->calculate_something;
  return $r;
}

Note: this is just simplified, and showing a chunk of the actual function I’m using.

Profile
 
 
Posted: 13 October 2007 07:00 AM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  567
Joined  07-22-2004

Check your character set, perhaps it’s not correctly setup?

 Signature 

ExpressionEngineer - custom solutions for EE

I EE

Profile
 
 
Posted: 13 October 2007 11:14 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  11
Joined  10-11-2007

That’s what I thought, too, but wouldn’t that effect EE as well?  I’ll check and change it and see if that works.

Profile
 
 
   
 
 
‹‹ Ampersand Plugin      Comment Custom Field ››
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1743, on December 02, 2009 03:47 PM
Total Registered Members: 120601 Total Logged-in Users: 67
Total Topics: 126640 Total Anonymous Users: 30
Total Replies: 665696 Total Guests: 403
Total Posts: 792336    
Members ( View Memberlist )