Character problems opening file on Water

Hi

When opening a project on Water, we can notice some invalid characters on the File

begin
// Cria o binding com autentica��o wsse
myBinding := new BasicHttpBinding();

Opening the same file on Visual Studio 2019 it works.

begin
// Cria o binding com autenticação wsse
myBinding := new BasicHttpBinding();

The file encoding is ANSI.

Thanks.

Can I see the file? what encoding does it have, and does it have a byte order mark? Water assumes UTF-8, if a file does not have a unicode preamble.

Hi

I’ve sent in private.

Thanks

BBEdit (the authoritative text edior on Mac) also doesnt like it, fwiw:

// Cria o binding com autenticaÁ„o

2F2F2043726961206F2062696E64696E6720636F6D20617574656E7469 63 61 E7 E3 6F 20

This is indeed invalid UTF8, I believe; this file seems to be in a local ANSI code page, without indication what that code page is. How was this file created and how was this text added (was it typed? if so in what editor)?

For now, id call this “as designed”, Water side, its doing the bets it can, with the lack of information what encoding this file uses…

Hi

Yeah its all ANSI local file. Doesn`t Water support it?

Which the best way to treat?

At.

problem is, there isn’t one ANSI, theres dozens, depending on your locale ;).

there bets option is to change the file type to UTF-8 in the original editor, which (I assume) understands what ANSI code page the file is supposed to be in.

I do not agree that every source code file without BOM should be treated as UTF8, instead normally this is ANSI.

And normally there is only one ANSI for an installed locale. Why don’t you pick the locale settings ?

The problem arises when switching code editing from Water to another IDE (which is capable of treating ANSI files) everty time the (Ansi-) source file gets ‘corrupted’.

You can of course continue to treat all source files as UTF8 but after intitially reading ANSI files as such.

What do you think ?

Fair enough, but that’s how it is, and chanhkng thios wlould be rathe rbreaking, at 20 years in…

As soon as you save a file form Water, it should have thje proper UTF-8 BOM.