PR# 19543 Bug when reading Eiffel class text with no BOM

Problem Report Summary
Submitter: gobobe
Category: Compiler
Priority: Low
Date: 2019/04/27
Class: Bug
Severity: Non-critical
Number: 19543
Release: 19.04.10.3074
Confidential: No
Status: Open
Responsible:
Environment: win
Synopsis: Bug when reading Eiffel class text with no BOM

Description
When one writes the following line at the beginning of a class text in EiffelStudio:

--é

and then uses the menu entry Edit->Advanced->Prettify Class, the line is replaced by:

	--?

with  unicode character instead of the accentuated e (in ISO 8859-1).

This is because of line 52 in ENCODING_DETECTION_FILE_BUFFER.detect_file where the 4 first characters are written verbatim to the buffer, and then line 42 in ASCII_UTF8_CONVERSION_FILE_BUFFER.make_from_file_buffer where these characters are not converted to UTF-8.

When the character é appears after the first 4 characters, then there is no such problem.

--
Eric Bezault
To Reproduce

										
Problem Report Interactions
From:gobobe    Date:2019/04/27    Status: Open    Download   
Note that there is  bug in the support site, where unicode characters are displayed correctly when we write the bug report and also when we click on the Preview button, but then appears as ? in the final report after clicking on the Confirm button.

--
Eric Bezault