diff options
| author | fisharebest <fisharebest@gmail.com> | 2010-04-24 20:37:34 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2010-04-24 20:37:34 +0000 |
| commit | 318de71faba2cdc9bbd9ce2a83badfb2b575919c (patch) | |
| tree | cdb48b40b88b1eb1e9d7d1615e634bc8ca42559d | |
| parent | e500c1d35dc9a565154f928db5c4f6f7ac0bbe7a (diff) | |
| download | webtrees-318de71faba2cdc9bbd9ce2a83badfb2b575919c.tar.gz webtrees-318de71faba2cdc9bbd9ce2a83badfb2b575919c.tar.bz2 webtrees-318de71faba2cdc9bbd9ce2a83badfb2b575919c.zip | |
Fix: character set detection
| -rw-r--r-- | import.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/import.php b/import.php index 7f73a18c0f..e03cf4074d 100644 --- a/import.php +++ b/import.php @@ -125,7 +125,7 @@ for ($end_time=microtime(true)+1.0; microtime(true)<$end_time; ) { exit; } // What character set is this? Need to convert it to UTF8 - if (preg_match('/\n1\s*CHAR(ACTER)\s+(.+)/', $data, $match)) { + if (preg_match('/\n1\s*CHAR(?:ACTER)?\s+(.+)/', $data, $match)) { $charset=strtoupper($match[1]); } else { $charset='ASCII'; @@ -168,7 +168,7 @@ for ($end_time=microtime(true)+1.0; microtime(true)<$end_time; ) { default: echo WT_JS_START, - 'alert(', htmlspecialchars(i18n::translate('Error: cannot convert GEDCOM file from %s encoding to UTF-8 encoding.', $charset)), ');', + 'alert(\'', htmlspecialchars(i18n::translate('Error: cannot convert GEDCOM file from %s encoding to UTF-8 encoding.', $charset)), '\');', WT_JS_END; break; } |
