Skip to content

Commit

Permalink
Fixes #22. Diacritics allowed in record cleaner rule files.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnvanbreda committed Oct 8, 2015
1 parent f245b6a commit 6cafb5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion application/config/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/**
* @var string The application files version number.
*/
$config['version'] = '0.9.1.6';
$config['version'] = '0.9.1.7';
$config['release_date'] = '2015-10-08';
$config['repository'] = 'https://github.com/Indicia-Team/warehouse/releases';

Expand Down
3 changes: 3 additions & 0 deletions modules/data_cleaner/controllers/verification_rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@ private function internal_upload_rule_file($totaldone, $cacheArr) {
throw new exception("Could not open file $filepath");
}
$filecontent = fread($resource,1000000);
// if no BOM, not unicode, so convert for safety. See Warehouse issue 22.
if (strpos($filecontent, "\xEF\xBB\xBF")!==0)
$filecontent = utf8_encode($filecontent);
$settings = data_cleaner::parse_test_file($filecontent);
$this->read_rule_content($settings, $cacheArr['files'][$totaldone]['path'], $cacheArr['files'][$totaldone]['source_url']);
return $cacheArr['files'][$totaldone]['display'];
Expand Down

0 comments on commit 6cafb5b

Please sign in to comment.