Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying UTF-8 encoding #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions workflows.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Description: This PHP class object provides several useful functions for retrieving, parsing,
* and formatting data to be used with Alfred 2 Workflows.
* Author: David Ferguson (@jdfwarrior)
* Revised: 6/6/2013
* Version: 0.3.3
* Revised: 6/19/2014
* Version: 0.3.4
*/
class Workflows {

Expand Down Expand Up @@ -177,7 +177,7 @@ public function toxml( $a=null, $format='array' ) {
return false;
endif;

$items = new SimpleXMLElement("<items></items>"); // Create new XML element
$items = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><items></items>'); // Create new XML element

foreach( $a as $b ): // Lop through each object in the array
$c = $items->addChild( 'item' ); // Add a new 'item' element for each object
Expand Down Expand Up @@ -480,4 +480,4 @@ public function result( $uid, $arg, $title, $sub, $icon, $valid='yes', $auto=nul
return $temp;
}

}
}