Thread: Bug? Text field is not viewable in a table...

Bug? Text field is not viewable in a table...

From
Durumdara
Date:
Dear Developers!

I found some problem in PGAdmin. V1.12.1, PG 9.0, Win7/X64.
I have a test table with "text" field.
I fillup this field with chr(1)...chr(255), so it contains 255 characters.

When I try to see this table, I got error:

ERROR:  character 0x81 of encoding "WIN1250" has no equivalent in "UTF8"

********** Error **********

ERROR: character 0x81 of encoding "WIN1250" has no equivalent in "UTF8"
SQL state: 22P05

This is very interesting error, because when I try to see this content
in a Delphi TEdit field, I can do it.
Only chr(0) is problematic, because it is string limitator sign in C.

In Python the Unicode handler can be set to if it found a non
convertable character, it can show '?' or other sign, or xmlreference,
etc.

I think that program MUST show the content, and if it is containing
unconvertable fields, it must warn before edit, but we CAN see the
data in any format.

Thanks for your help:  dd


Re: Bug? Text field is not viewable in a table...

From
Dave Page
Date:
On Thu, Apr 14, 2011 at 7:58 AM, Durumdara <durumdara@gmail.com> wrote:
> Dear Developers!
>
> I found some problem in PGAdmin. V1.12.1, PG 9.0, Win7/X64.
> I have a test table with "text" field.
> I fillup this field with chr(1)...chr(255), so it contains 255 characters.
>
> When I try to see this table, I got error:
>
> ERROR:  character 0x81 of encoding "WIN1250" has no equivalent in "UTF8"
>
> ********** Error **********
>
> ERROR: character 0x81 of encoding "WIN1250" has no equivalent in "UTF8"
> SQL state: 22P05

That error comes from PostgreSQL, and is entirely expected if you try
to store non-printable characters in a text column, and then convert
it to UTF-8 (which is what happens when pgAdmin requests data).
PostgreSQL is extremely strict about enforcing the correctness of
unicode data.


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Bug? Text field is not viewable in a table...

From
Dave Page
Date:
[Please keep the list CCd]

On Thu, Apr 14, 2011 at 8:42 AM, Durumdara <durumdara@gmail.com> wrote:
> Dear Dave!
>
> 2011/4/14 Dave Page <dpage@pgadmin.org>:
>> On Thu, Apr 14, 2011 at 7:58 AM, Durumdara <durumdara@gmail.com> wrote:
>>> Dear Developers!
>>>
>>> I found some problem in PGAdmin. V1.12.1, PG 9.0, Win7/X64.
>>> I have a test table with "text" field.
>>> I fillup this field with chr(1)...chr(255), so it contains 255 characters.
>>>
>>> When I try to see this table, I got error:
>>>
>>> ERROR:  character 0x81 of encoding "WIN1250" has no equivalent in "UTF8"
>>>
>>> ********** Error **********
>>>
>>> ERROR: character 0x81 of encoding "WIN1250" has no equivalent in "UTF8"
>>> SQL state: 22P05
>>
>> That error comes from PostgreSQL, and is entirely expected if you try
>> to store non-printable characters in a text column, and then convert
>> it to UTF-8 (which is what happens when pgAdmin requests data).
>> PostgreSQL is extremely strict about enforcing the correctness of
>> unicode data.
>
> Interesting, because the local is Win1250, and the database is Win1250
> too... :-(
>
> Is it PG bug?

Assuming everything that is legal in win1250 does map to something in
utf-8, then it sounds to me like PG isn't being as strict about
enforcing the correctness of win1250 strings as it does utf-8.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Bug? Text field is not viewable in a table...

From
Durumdara
Date:
Hi!

I wrote to the PGSQL list.
I checked with EMS PG Manager, and I can show the row. I don't know, how... :-(

Thanks:  dd

2011/4/14 Dave Page <dpage@pgadmin.org>:
> [Please keep the list CCd]
>
> On Thu, Apr 14, 2011 at 8:42 AM, Durumdara <durumdara@gmail.com> wrote:
>> Dear Dave!
>>
>> 2011/4/14 Dave Page <dpage@pgadmin.org>:
>>> On Thu, Apr 14, 2011 at 7:58 AM, Durumdara <durumdara@gmail.com> wrote:
>>>> Dear Developers!
>>>>
>>>> I found some problem in PGAdmin. V1.12.1, PG 9.0, Win7/X64.
>>>> I have a test table with "text" field.
>>>> I fillup this field with chr(1)...chr(255), so it contains 255 characters.
>>>>
>>>> When I try to see this table, I got error:
>>>>
>>>> ERROR:  character 0x81 of encoding "WIN1250" has no equivalent in "UTF8"
>>>>
>>>> ********** Error **********
>>>>
>>>> ERROR: character 0x81 of encoding "WIN1250" has no equivalent in "UTF8"
>>>> SQL state: 22P05
>>>
>>> That error comes from PostgreSQL, and is entirely expected if you try
>>> to store non-printable characters in a text column, and then convert
>>> it to UTF-8 (which is what happens when pgAdmin requests data).
>>> PostgreSQL is extremely strict about enforcing the correctness of
>>> unicode data.
>>
>> Interesting, because the local is Win1250, and the database is Win1250
>> too... :-(
>>
>> Is it PG bug?
>
> Assuming everything that is legal in win1250 does map to something in
> utf-8, then it sounds to me like PG isn't being as strict about
> enforcing the correctness of win1250 strings as it does utf-8.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: Bug? Text field is not viewable in a table...

From
Dave Page
Date:
On Thu, Apr 14, 2011 at 9:39 AM, Durumdara <durumdara@gmail.com> wrote:
> Hi!
>
> I wrote to the PGSQL list.
> I checked with EMS PG Manager, and I can show the row. I don't know, how... :-(

It may not use UTF-8. pgAdmin does, because we actively support a
*lot* of languages and using UTF-8 is by far the most reliable way
we've found of doing that.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company