Indefero

Indefero Commit Details


Date:2010-03-26 08:53:43 (14 years 8 months ago)
Author:Loic d'Anterroches
Branch:develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:a5f97c59d9e43cb2e544aba340f52c95dad9d78e
Parents: 77c7f8ecfef134f40ab0687e812faec36d56ec39
Message:Fixed missing detection of ISO-8859-2 characters.

Changes:

File differences

src/IDF/Commit.php
171171
172172
173173
174
174
175175
176176
177177
*/
public static function toUTF8($text)
{
$enc = 'ASCII, UTF-8, ISO-8859-1, JIS, EUC-JP, SJIS';
$enc = 'ASCII, UTF-8, ISO-8859-2, ISO-8859-1, JIS, EUC-JP, SJIS';
$ref = $text;
if (is_array($text)) {
$ref = $text[0];
src/IDF/Tests/TestGit.php
5858
5959
6060
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
6179
}
}
/**
* parse a log encoded in iso 8859-2
*/
public function testParseIsoLog2()
{
$log_lines = preg_split("/\015\012|\015|\012/", file_get_contents(dirname(__FILE__).'/data/git-log-iso-8859-2.txt'));
$log = IDF_Scm_Git::parseLog($log_lines);
$titles = array(
'Dodałem model',
'Dodałem model',
);
foreach ($log as $change) {
$this->assertEqual(array_shift($titles),
IDF_Commit::toUTF8($change->title));
}
}
}
src/IDF/Tests/data/git-log-iso-8859-2.txt
1
2
3
4
5
6
7
8
9
10
11
12
commit 11531a9dbc64a65150f2f38fbea7cef9d478a123
Author: unknown <a@(none)>
Date: Fri Jul 3 01:44:11 2009 +0200
commit 11531a9dbc64a65150f2f38fbea7cef9d478a123
Author: unknown <a@(none)>
Date: Fri Jul 3 01:44:11 2009 +0200

Archive Download the corresponding diff file

Page rendered in 0.07661s using 13 queries.