[Lazarus] Change file Encode codepage?
Zaher Dirkey
parmaja at gmail.com
Fri Aug 19 13:30:27 CEST 2011
On Thu, Aug 18, 2011 at 10:55 PM, Zaher Dirkey <parmaja at gmail.com> wrote:
>
>
> On Thu, Aug 18, 2011 at 8:19 PM, Mattias Gaertner <
> nc-gaertnma at netcologne.de> wrote:
>
>> When the IDE opens a file it tries to guess what encoding it is. It
>> then converts the file in memory to UTF-8.
>> If you think the IDE guessed right and you
>> want to convert the file to another encoding, use "Change File".
>> If you think the IDE guessed wrong and it should open it with another
>> encoding use the "Reopen".
>>
>>
>> > 2 - When (Reopen with another encode) it is add strange chars in the
>> first
>> > line of the file, is that bug?.
>>
>> That's pretty normal if you open a file and use the wrong encoding
>> to convert it to UTF-8.
>>
>
> Ah i see that is normal now.
> But still there is problem when open the file have UTF8 with BOM, not when
> use change the Encode, just normal open the file, it is add space(strange
> char) at the first char + first line, in Hex view of file there is the
> correct 3 BOM bytes, it is happned when i opened the file in Delphi UTF8+BOM
> and then open it in Lazarus.
> Would some one test it also before submit a bug(or search for it :) ).
>
>
The probelm it happend when choose the file witout BOM, close it, open it
outside Lazarus IDE, change the format to With BOM, lazarus remember file
ecnodeing that choose for the file, the file opened now as Without BOM but
bom bytes now loaded to the SynEdit.
I think Lazarus must check the BOM bytes even if choosed another format.
Thanks
Zaher Dirkey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110819/4d39dcf4/attachment-0003.html>
More information about the Lazarus
mailing list