Thread: PgAdmin 1.8.0 beta 3 bug: Open file in Query Tool

PgAdmin 1.8.0 beta 3 bug: Open file in Query Tool

From
"Luiz K. Matsumura"
Date:
Dave Page wrote:
> Not really - it's generated from all the other bits of data. I updated
> the .exe at http://developer.pgadmin.org/~dpage/pgadmin3.zip; try it out
> and see what you think.
>
> /D
>
>   
Hi, I download this snapshot, and detect a problem with query tool ( win 
XP pro)
The file open option is not working for me: I select the file but 
nothing is loaded from the file.

I tested with the original 1.8.0 beta3 pgadmin.exe and it not load files 
too.
Version 1.6.3 works fine.

TIA

-- 
Luiz K. Matsumura
Plan IT Tecnologia Informática Ltda.



Re: PgAdmin 1.8.0 beta 3 bug: Open file in Query Tool

From
"Luiz K. Matsumura"
Date:
 
> Hi, I download this snapshot, and detect a problem with query tool ( 
> win XP pro)
> The file open option is not working for me: I select the file but 
> nothing is loaded from the file.
>
> I tested with the original 1.8.0 beta3 pgadmin.exe and it not load 
> files too.
> Version 1.6.3 works fine.
>
> TIA
>
Hi, I'm again...
I investigate more, and this ocurr only with files with files with ansi 
files with accentuated characters ( like "çãé..." ).
If I disable the option on the preferences: "Read and write Unicode 
UTF-8 files", then the file is loaded.
If I edit a file with this option enabled, then this characters is write 
in Unicode (I suppose) and now the file is correctly loaded and displayed.
Disabling this option, now the file is loaded, but the characters isn't 
translated.

But in 1.6.3 both files are loaded with "Read and write Unicode UTF-8 
files" enabled and translated to corresponding characters.
This is a new behavior or a bug ?


-- 
Luiz K. Matsumura
Plan IT Tecnologia Informática Ltda.



Re: PgAdmin 1.8.0 beta 3 bug: Open file in Query Tool

From
"Hiroshi Saito"
Date:
Hi.

From: "Luiz K. Matsumura" <luiz@planit.com.br>


>
>> Hi, I download this snapshot, and detect a problem with query tool ( win XP pro)
>> The file open option is not working for me: I select the file but nothing is loaded from 
>> the file.
>>
>> I tested with the original 1.8.0 beta3 pgadmin.exe and it not load files too.
>> Version 1.6.3 works fine.
>>
>> TIA
>>
> Hi, I'm again...
> I investigate more, and this ocurr only with files with files with ansi files with 
> accentuated characters ( like "çãé..." ).
> If I disable the option on the preferences: "Read and write Unicode UTF-8 files", then the 
> file is loaded.
> If I edit a file with this option enabled, then this characters is write in Unicode (I 
> suppose) and now the file is correctly loaded and displayed.

Yes, The option always desires reading and writing by UTF-8.

> Disabling this option, now the file is loaded, but the characters isn't translated.

Umm, As for Japanes, The beginning serves as SJIS localized correctly.
Then, Each of SJIS and UTF-8 is correctly expressed for reading.
If possible, please send the file containing the code of your problem..

>
> But in 1.6.3 both files are loaded with "Read and write Unicode UTF-8 files" enabled and 
> translated to corresponding characters.
> This is a new behavior or a bug ?

1.6.3 had UTF-8 crash problem. It became fixed now.

Regards,
Hiroshi Saito 



Re: PgAdmin 1.8.0 beta 3 bug: Open file in Query Tool

From
"Luiz K. Matsumura"
Date:
Hiroshi Saito wrote:
>> Hi, I'm again...
>> I investigate more, and this ocurr only with files with files with
>> ansi files with accentuated characters ( like "çãé..." ).
>> If I disable the option on the preferences: "Read and write Unicode
>> UTF-8 files", then the file is loaded.
>> If I edit a file with this option enabled, then this characters is
>> write in Unicode (I suppose) and now the file is correctly loaded and
>> displayed.
>
> Yes, The option always desires reading and writing by UTF-8.
>
>> Disabling this option, now the file is loaded, but the characters
>> isn't translated.
>
> Umm, As for Japanes, The beginning serves as SJIS localized correctly.
> Then, Each of SJIS and UTF-8 is correctly expressed for reading.
> If possible, please send the file containing the code of your problem..
>
Hi Hiroshi,

Thanks for reply. Sample file attached.

Best Regards

--
Luiz K. Matsumura
Plan IT Tecnologia Informática Ltda.


Attachment

Re: PgAdmin 1.8.0 beta 3 bug: Open file in Query Tool

From
"Hiroshi Saito"
Date:
Hi.

From: "Luiz K. Matsumura" <luiz@planit.com.br>

> Thanks for reply. Sample file attached.
> 

Umm, UTF8 was not able to be found from the received file.?_?
Can my test code be used? 
http://winpg.jp/~saito/pgAdmin/SQLTEST_ANSI_UTF8.zip
However, ANSI file is Shift_jis. please use the UTF8.sql.

Regards,
Hiroshi Saito


Re: PgAdmin 1.8.0 beta 3 bug: Open file in Query Tool

From
"Hiroshi Saito"
Date:
>> Thanks for reply. Sample file attached.

This is in the state when turning OFF option and reading it.
http://winpg.jp/~saito/pgAdmin/Luiz_testsql.png

Probably, RC version may help you.

Regards,
Hiroshi Saito


Re: PgAdmin 1.8.0 beta 3 bug: Open file in Query Tool

From
"Luiz K. Matsumura"
Date:
Hi.

Hiroshi Saito wrote:
> Umm, UTF8 was not able to be found from the received file.?_?
> Can my test code be used? 
> http://winpg.jp/~saito/pgAdmin/SQLTEST_ANSI_UTF8.zip
> However, ANSI file is Shift_jis. please use the UTF8.sql.
>
> Regards,
> Hiroshi Saito
Yes, your code is perfect. The problem occur with ANSI files. When the 
file is UTF8, it works correctly with or without
"Read and write Unicode UTF-8 files" option enabled

Regards

-- 
Luiz K. Matsumura
Plan IT Tecnologia Informática Ltda.



Re: PgAdmin 1.8.0 beta 3 bug: Open file in Query Tool

From
"Hiroshi Saito"
Date:
Hi.

From: "Luiz K. Matsumura" <luiz@planit.com.br>


> Hi.
> 
> Hiroshi Saito wrote:
>> Umm, UTF8 was not able to be found from the received file.?_?
>> Can my test code be used? 
>> http://winpg.jp/~saito/pgAdmin/SQLTEST_ANSI_UTF8.zip
>> However, ANSI file is Shift_jis. please use the UTF8.sql.
>>
>> Regards,
>> Hiroshi Saito
> Yes, your code is perfect. The problem occur with ANSI files. When the 
> file is UTF8, it works correctly with or without
> "Read and write Unicode UTF-8 files" option enabled

Ah yes, Reading is generous a little. However, It is "Read and write" option....
Do you desire a function which only writing limited?  In the distant past, It had 
classified to the timing of reading and writing before. It is the evolved action now. 
Therefore, I think the method which cleared confusion by now.
Although it may be necessary to still evolve.

Regards,
Hiroshi Saito



Re: PgAdmin 1.8.0 beta 3 bug: Open file in Query Tool

From
"Luiz K. Matsumura"
Date:
Hiroshi Saito wrote:
>
> Ah yes, Reading is generous a little. However, It is "Read and write" 
> option....
> Do you desire a function which only writing limited?  In the distant 
> past, It had classified to the timing of reading and writing before. 
> It is the evolved action now. Therefore, I think the method which 
> cleared confusion by now.
> Although it may be necessary to still evolve.
>
> Regards,
> Hiroshi Saito
>
Hi Saito san,

IMHO, I think that a better approach is to PgAdmin respect the original 
file format when saving a loaded file.
When the file is ANSI, no translations for characters (even when we have 
possible Unicode encoded characters)
When the file is UTF8, load and save as UTF8
And put an option in the "Save as" window to select the file format to 
save (ANSI or UTF8)
On the options windows we can have an option to default file format.

Regards,

Luiz K. Matsumura
Plan IT Tecnologia Informática Ltda.