View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0013649 | mantisbt | scripting | public | 2011-12-06 03:54 | 2012-11-23 18:02 |
| Reporter | sbs | Assigned To | rombert | ||
| Priority | normal | Severity | block | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Platform | Windows | ||||
| Product Version | 1.2.8 | ||||
| Summary | 0013649: Check-In fails on logs with accented chars | ||||
| Description | The attached log does not import using checking and PHP 5, on a FR-FR version of windows running the script in a command prompt | ||||
| Tags | No tags attached. | ||||
| Attached Files | tmp_4142_bug.txt (193 bytes)
SVN Revision 4142
dt
2011-12-06 09:42:46 +0100 (mar., 06 d�c. 2011)
FIX:0001448
Added XML Schema validation of the incoming config file before loading it to detect malformed files.
| ||||
|
Is this about the source integration plugin? |
|
|
As far as I know, it is not, I am just using the checkin.php function to add notes when some commits happen in our svn repo. I did not use the plugin since I am under the impression that it needs some sort of cron to run while the checkin is run from the repository at the commit time. |
|
|
OK, I see now. Is there some sort of error message that you can add to the report? |
|
|
Here is the return message from php for that text file: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
|
I am not fully proficient with MySql but I have found the following charset configuration : collation_... latin1_swedish_ci we enter daily bugs and notes including accented chars from our web browsers |
|
|
Then I think we're left with option 2, the file is incorrectly passed to Mantis . Or incorrectly read by Mantis. But I don't have any idea how to debug that, as my experience with Windows is very limited. |
|
|
anything I can do to help debugging that? |
|
|
(In reply to comment 0013649:0030506)
Can you insert the following lines around line 65, after the while loop? echo 'Extracted message:'; |
|
|
Here you go: Extracted message:------------------ SVN Revision 4142 the é has been replaced by another accented char. |
|
|
Right. So this means that when reading characters from the console the conversion is incorrect. There doesn't seem to be a way to detect the character encoding from PHP, so I tried to look for windows console encoding solutions. I'm not sure how you launch the checking process, but this might be of interest to you. http://stackoverflow.com/questions/1259084/what-encoding-code-page-is-cmd-exe-using You might want to try setting the console encoding to Latin-1 or UTF-8 for the checkin operation. |
|
|
I had found this page before and tried playing with the code page in my script. It did not bring any help. I just tried chcp 850 and 1251, the script still does not import the issue. |
|
|
Perhaps chcp 65001 for utf-8? |
|
|
with chcp 65001 the script stops right after selecting the code page |
|
|
Not really sure what to say then. My windows knowledege is limited, so I can't say what steps to take. |
|
|
Hi, It's been a long time, but I found a fix to my accented issue :) svn log stream is ANSI encoded, while php expects a UTF-8 encoding. I have thus written a small app that convert ANSI Stream to UTF-8 and now accented commit logs can get into the bugtrack thourgh checkin. |
|
|
Thanks for the feedback. |
|
|
Moving back status change from checkin, just documented the UTF-8 requirement. |
|