I got a problem is that I created a diff with arc on windows ,used the command "arc diff . --encoding GBK",then the differential was accepted by reviewer,it shows pretty normal.But, i used "arc commit -- revison Dxxx" to commit the changes.The differential's final diff shows "This file uses an unknow character encoding".
my environment is :
arc on windows 7 x64,
server os :redhat6.3 x64 or sles 10(i586)
php version:v2.3.0
apache/2.2.15
Description
Description
Status | Assigned | Task | ||
---|---|---|---|---|
Resolved | • clark.woo.12 | T7116 differential final diff shows "This file uses an unknown character encoding" | ||
Resolved | epriestley | T4045 Store diffs as binary, not UTF-8 | ||
Resolved | epriestley | T3788 Improve encoding management in Diffusion |
Event Timeline
Comment Actions
I think this problem is that:I used to write my code in eclipse,the workspace properties "Text file encoding" was seted as "GBK".
I seted "Diffusion"->"Edit Repository"->"Text Encoding","GBK",my code shows normal in Diffusion,but it shows abnormal in Differential's final diff.
Maybe,i need convert the code to "GBK" in Differential's final diff.
Comment Actions
Partially resolved,I changed line197 in PhabricatorLiskDAO.php.I added "EUC-CN"(php 5.3.3) in the first place in "try_encodings" array.
When the daemon generateFinalDiff,it converted the data from "GBK" to “UTF-8”.
line 180:phutil_is_utf8($string) ? 'utf8' : null;
changed to
line 180:phutil_is_utf8($string) ? 'utf8' : 'gbk';