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:  559
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
 
 
   
 
 
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 1149, on July 16, 2007 10:33 AM
Total Registered Members: 60973 Total Logged-in Users: 16
Total Topics: 73688 Total Anonymous Users: 17
Total Replies: 397489 Total Guests: 471
Total Posts: 471177    
Members ( View Memberlist )