Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with COMMENT ON and strings using introducer (charset) [CORE2804] #3192

Closed
firebird-automations opened this issue Jan 14, 2010 · 9 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @ibprovider

Server Version 2.5.0.25856

------- TEST1
Connection with NONE charset

When I run the
comment on TABLE dual is _win1251 'russian text'
Server returns the "malformed string". Here 'russian text' in win1251 charset

When I run the
comment on TABLE dual is _unicode_fss 'russian text'
Server returns OK. Here 'russian text' in UNICODE_FSS charset

------- TEST2
Connection with WIN1251 charset

When I run the
comment on TABLE dual is _win1251 'russian text'
Server returns OK.

When I run the
comment on TABLE dual is _unicode_fss 'russian text in UTF8 charset'
Server returns OK. But writes in system table the text with wrong charset

Commits: 914ef4c d129eec

====== Test Details ======

Database 'core2804-ods11.fbk' was prepared with following statements:
recreate table test1(id int);
recreate table test2(id int);
commit;
comment on table test1 is _win1251 'win1251: <cyrillic text here encoded with win1251>';
comment on table test2 is _unicode_fss 'unicode_fss: <cyrillic text here encoded with UTF8>';
commit;

Connection charset can be either 'UTF8' or 'WIN1251' - it should works with the same result.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

reporter: Pavel Cisar [ pcisar ] => Kovalenko Dmitry [ _dima_k_ ]

security: Managers [ 10013 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Version: 3.0 Initial [ 10301 ]

Fix Version: 2.5 RC2 [ 10372 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

Component: Engine [ 10000 ]

assignee: Adriano dos Santos Fernandes [ asfernandes ]

summary: The problems with [COMMENT ON table IS 'russian text'] and markers of charsets => Problems with COMMENT ON and strings using introducer (charset)

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: Done with caveats

Test Details: Database 'core2804-ods11.fbk' was prepared with following statements:
recreate table test1(id int);
recreate table test2(id int);
commit;
comment on table test1 is _win1251 'win1251: <cyrillic text here encoded with win1251>';
comment on table test2 is _unicode_fss 'unicode_fss: <cyrillic text here encoded with UTF8>';
commit;

Unfortunatelly, I don`t know how to extract and check data in fbt_run using WIN1251 charset:
it produces error 'assert connection_character_set in CHARACTER_SETS', so use only UTF8

@firebird-automations
Copy link
Collaborator Author

Commented by: @ibprovider

>Unfortunatelly, I don`t know how to extract and check data in fbt_run using WIN1251 charset

select cast( cast(rf.rdb$description as BLOB SUB_TYPE TEXT CHARACTER SET WIN1251) as BLOB SUB_TYPE TEXT CHARACTER SET NONE) from rdb$relation_fields rf

?

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

2 Kovalenko Dmitry: thanks, now all works fine.
All .fbt file needs to be encoded in UTF8, connection charset can be changed from UTF8 to WIN1251 w/o any problem.
I will update test in fbt-repo and remove last part of comment to it.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

Test Details: Database 'core2804-ods11.fbk' was prepared with following statements:
recreate table test1(id int);
recreate table test2(id int);
commit;
comment on table test1 is _win1251 'win1251: <cyrillic text here encoded with win1251>';
comment on table test2 is _unicode_fss 'unicode_fss: <cyrillic text here encoded with UTF8>';
commit;

Unfortunatelly, I don`t know how to extract and check data in fbt_run using WIN1251 charset:
it produces error 'assert connection_character_set in CHARACTER_SETS', so use only UTF8

=>

Database 'core2804-ods11.fbk' was prepared with following statements:
recreate table test1(id int);
recreate table test2(id int);
commit;
comment on table test1 is _win1251 'win1251: <cyrillic text here encoded with win1251>';
comment on table test2 is _unicode_fss 'unicode_fss: <cyrillic text here encoded with UTF8>';
commit;

Connection charset can be either 'UTF8' or 'WIN1251' - it should works with the same result.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: Done with caveats => Done successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment