Page MenuHomePhabricator

differential final diff shows "This file uses an unknown character encoding"
Closed, ResolvedPublic

Assigned To
Authored By
clark.woo.12
Feb 3 2015, 3:30 AM
Referenced Files
F281476: locale.png
Feb 3 2015, 3:32 AM
F281471: img4.png
Feb 3 2015, 3:32 AM
F281469: img3.png
Feb 3 2015, 3:32 AM
F281465: img1.png
Feb 3 2015, 3:32 AM
F281467: img2.png
Feb 3 2015, 3:32 AM
F281474: img5.png
Feb 3 2015, 3:32 AM

Description

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

Event Timeline

clark.woo.12 claimed this task.
clark.woo.12 raised the priority of this task from to Needs Triage.
clark.woo.12 updated the task description. (Show Details)
clark.woo.12 added a project: Differential.

img1.png (621×1 px, 50 KB)

img2.png (240×1 px, 16 KB)

img3.png (232×1 px, 39 KB)

img4.png (202×1 px, 14 KB)

img5.png (164×1 px, 27 KB)

locale.png (275×1 px, 23 KB)

chad removed a subscriber: epriestley.

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.

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';

clark.woo.12 renamed this task from differential final diff shows "This file uses an unknow character encoding" to differential final diff shows "This file uses an unknown character encoding".Nov 8 2015, 11:57 AM