My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 3470: Preserve characters encoding in inline editing
2 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----
Cc:  David.Os...@gmail.com


Sign in to add a comment
 
Reported by baptiste...@gmail.com, Jul 9, 2015
*****************************************************************
*****                                                       *****
***** !!!! THIS BUG TRACKER IS FOR GERRIT CODE REVIEW !!!!  *****
*****                                                       *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, CYANOGENMOD,  *****
***** INTERNAL ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.*****
*****                                                       *****
*****   THOSE ISSUES BELONG IN DIFFERENT ISSUE TRACKERS     *****
*****                                                       *****
*****************************************************************

Affected Version: 2.11

What steps will reproduce the problem?
1. With the inline-editor, edit a file encoded in Cp1252
2. Publish the new change
3. The edited file has been converted in UTF-8

What is the expected output? What do you see instead?


I expect, when a file is edited with the inline-editor, this file is published with the same encoding. 
If a file is created with the inline-editor, the encoding of it correspond to the encoding defined in a gerrit configuration file.

Actually, when a file is edited with the inline-editor, the accented characters in this file have a bad encoding.


Please provide any additional information below.

Jul 13, 2015
Project Member #1 david.pu...@sonymobile.com
Same root cause as issue 3367?
Cc: David.Os...@gmail.com
Jul 20, 2015
#2 baptiste...@gmail.com
Thank you for your response, but I don’t understand the link with the issue 3367. 
My problem concerns the file encoding and not the track move files in git. 
My problem is seen only when I use the inline-editor. Do you know if all content of files are converted in UTF-8, before displaying it in the web gerrit? And after editing a file with inline-edit, the file's encoding rest in UTF-8 instead of convert it in CP1252?  Because accented characters are always display correctly by the web gerrit, but when I open my file in notepad++, after edit it with the inline-edit, this file is converted in UTF-8, whereas this file was encoded in CP1252.   
I hope my problem is clearer.
Jul 20, 2015
Project Member #3 David.Os...@gmail.com
> Do you know if all content of files are converted in UTF-8, before displaying it in the web gerrit?

Yes. This commit might be related: [1].

* [1] https://gerrit-review.googlesource.com/63130
Jul 23, 2015
#4 baptiste...@gmail.com
Thank you for this information. So, what is your preconisation to skirt this problem?

Is it possible to define files encoding by extension, in the .gitattributes? Like the LF/CRLF configuration? 
Example:
    *.csv 	encoding=UTF-8
    *.java	encoding=ISO-8859-1

This configuration could be used by the inline-editor to encode files, with the good encoding, before commit it?
Aug 26, 2015
#5 emmanuel...@gmail.com
See also Issue 3345 about the preservation of line-endings after an inline editing.
Aug 31, 2015
#6 baptiste...@gmail.com
Thank you for your response. Can you give me more explanation, because I don’t understand, how the configuration of crlf in git, can solve my problem about characters encoding (UTF-8 and Cp1252).
Sign in to add a comment

Powered by Google Project Hosting