Thread: It is possible to add an option to save files without UTF-8 BOM sequence

It is possible to add an option to save files without UTF-8 BOM sequence

From
Taras Kopets
Date:
Hi list,

I use DB versioning infrastructure using incremental sql scripts.
Feeding file that was created or modified with pgAdmin to psql gives an error.

Is there any possibility to save UTF-8 files without BOM sequence or add respective option in pgAdmin?

Taras Kopets

Re: It is possible to add an option to save files without UTF-8 BOM sequence

From
Guillaume Lelarge
Date:
Le 16/11/2010 15:19, Taras Kopets a écrit :
> [...]
> I use DB versioning infrastructure using incremental sql scripts.
> Feeding file that was created or modified with pgAdmin to psql gives an
> error.
> 
> Is there any possibility to save UTF-8 files without BOM sequence or add
> respective option in pgAdmin?
> 

There's no possibility to do that right now. But I'm not against having
such an option.


-- 
Guillaumehttp://www.postgresql.frhttp://dalibo.com


Re: It is possible to add an option to save files without UTF-8 BOM sequence

From
Taras Kopets
Date:
On Tue, Nov 16, 2010 at 4:47 PM, Guillaume Lelarge <guillaume@lelarge.info> wrote:
There's no possibility to do that right now. But I'm not against having
such an option.

Is this some internal limitation of wxWidgets or time effort is too big?

Taras Kopets

Re: It is possible to add an option to save files without UTF-8 BOM sequence

From
Guillaume Lelarge
Date:
Le 16/11/2010 16:01, Taras Kopets a écrit :
> On Tue, Nov 16, 2010 at 4:47 PM, Guillaume Lelarge
> <guillaume@lelarge.info>wrote:
>>
>> There's no possibility to do that right now. But I'm not against having
>> such an option.
>>
> 
> Is this some internal limitation of wxWidgets or time effort is too big?
> 

That's not a limitation of wxWidgets. It's doable in 2/3 hours of work.
Not sure we really want to add a workaround for this. And actually, this
is not a bug in pgAdmin. psql and surely quite a lot of tools don't do
that write. In psql's specific case, I think it's already fixed.

Anyway, as already stated, I'm not against adding such an option. It's
quite simple to add, but it is another option to add on an already
filled dialog.


-- 
Guillaumehttp://www.postgresql.frhttp://dalibo.com


Re: It is possible to add an option to save files without UTF-8 BOM sequence

From
Taras Kopets
Date:
On Tue, Nov 16, 2010 at 6:58 PM, Guillaume Lelarge <guillaume@lelarge.info> wrote:
That's not a limitation of wxWidgets. It's doable in 2/3 hours of work.
Not sure we really want to add a workaround for this. And actually, this
is not a bug in pgAdmin. psql and surely quite a lot of tools don't do
that write. In psql's specific case, I think it's already fixed.

Anyway, as already stated, I'm not against adding such an option. It's
quite simple to add, but it is another option to add on an already
filled dialog.

According to wiki - Unicode standard does not require or recommend BOM, 
further mentioning that BOM could possibly break stuff in Unix-like systems.

I don't see the problem with adding one checkbox to options page, if this option 
solves compatibility problem with main postgres tool (psql).

If you look closer to option page there is even checkbox "Reset guru hints", 
which is much less important than checkbox "Let me run my files in psql".

What do you think?

Taras Kopets

Re: It is possible to add an option to save files without UTF-8 BOM sequence

From
Guillaume Lelarge
Date:
Le 16/11/2010 21:31, Taras Kopets a écrit :
> On Tue, Nov 16, 2010 at 6:58 PM, Guillaume Lelarge
> <guillaume@lelarge.info>wrote:
> 
>> That's not a limitation of wxWidgets. It's doable in 2/3 hours of work.
>> Not sure we really want to add a workaround for this. And actually, this
>> is not a bug in pgAdmin. psql and surely quite a lot of tools don't do
>> that write. In psql's specific case, I think it's already fixed.
>>
>> Anyway, as already stated, I'm not against adding such an option. It's
>> quite simple to add, but it is another option to add on an already
>> filled dialog.
> 
> 
> According to wiki - Unicode standard does not require or recommend BOM,
> further mentioning that BOM could possibly break stuff in Unix-like systems.
> 

Perhaps, I don't know quite a lot about BOM.

> I don't see the problem with adding one checkbox to options page, if this
> option
> solves compatibility problem with main postgres tool (psql).
> 

psql 9.0 knows how to handle this.

> If you look closer to option page there is even checkbox "Reset guru
> hints",
> which is much less important than checkbox "Let me run my files in psql".
> 

Much less for you, right. Doesn't mean everyone has the same opinion.
And removing something is usually not appreciated.

> What do you think?
> 

That I'm waiting for your patch :)


-- 
Guillaumehttp://www.postgresql.frhttp://dalibo.com


Re: It is possible to add an option to save files without UTF-8 BOM sequence

From
Guillaume Lelarge
Date:
Le 16/11/2010 22:39, Guillaume Lelarge a écrit :
> Le 16/11/2010 21:31, Taras Kopets a écrit :
>> On Tue, Nov 16, 2010 at 6:58 PM, Guillaume Lelarge
>> <guillaume@lelarge.info>wrote:
>>
>>> That's not a limitation of wxWidgets. It's doable in 2/3 hours of work.
>>> Not sure we really want to add a workaround for this. And actually, this
>>> is not a bug in pgAdmin. psql and surely quite a lot of tools don't do
>>> that write. In psql's specific case, I think it's already fixed.
>>>
>>> Anyway, as already stated, I'm not against adding such an option. It's
>>> quite simple to add, but it is another option to add on an already
>>> filled dialog.
>>
>>
>> According to wiki - Unicode standard does not require or recommend BOM,
>> further mentioning that BOM could possibly break stuff in Unix-like systems.
>>
> 
> Perhaps, I don't know quite a lot about BOM.
> 
>> I don't see the problem with adding one checkbox to options page, if this
>> option
>> solves compatibility problem with main postgres tool (psql).
>>
> 
> psql 9.0 knows how to handle this.
> 
>> If you look closer to option page there is even checkbox "Reset guru
>> hints",
>> which is much less important than checkbox "Let me run my files in psql".
>>
> 
> Much less for you, right. Doesn't mean everyone has the same opinion.
> And removing something is usually not appreciated.
> 
>> What do you think?
>>
> 
> That I'm waiting for your patch :)
> 

BTW, I added a ticket, so that we remember your request when we'll some
time to work on it.


-- 
Guillaumehttp://www.postgresql.frhttp://dalibo.com