ISQL -X ignores connection charset for text of EXCEPTION message (restoring it in initial charset when exception was created) -----------------------------------------------------------------------------------------------------------------------------
Key: CORE-5209 URL: http://tracker.firebirdsql.org/browse/CORE-5209 Project: Firebird Core Issue Type: Bug Reporter: Pavel Zotov Attachments: console-screens-after-extract-metadata-by-isql-x-ch_utf8-_-non-readable-exception-message.PNG, notepad-plus-plus-does-recognizes-code-page-of-file-by-exception-message-thus-we-cannot-read-SP-comments.PNG Following was done on Windows XP with locale = RU_ru, ISQL from FB 2.5.6: C:\>chcp 1251 Текущая кодовая страница: 1251 C:\>cd \temp C:\TEMP>C:\MIX\firebird\fb25\bin\isql -q SQL> set names win1251; SQL> create database 'localhost/3255:c:\temp\tmpcp1251.fdb'; SQL> set term ^; SQL> create procedure sp_test as CON> begin CON> -- процедурка для проверки складских остатков CON> /* написана очень умными сотрудниками склада */ CON> end ^ SQL> set term ;^ SQL> commit; SQL> create exception ex_neg_remainder 'Операция невозможна: остаток на складе станет отрицательным.'; SQL> commit; SQL> exit; If we check now metadata using connection charset = WIN1251 - all works fine, every non-ascii message is readable: C:\TEMP>C:\MIX\firebird\fb25\bin\isql localhost/3255:c:\temp\tmpcp1251.fdb -ch win1251 -x === SET SQL DIALECT 3; ... /* Exceptions */ CREATE EXCEPTION EX_NEG_REMAINDER 'Операция невозможна: остаток на складе станет отрицательным.'; ... ALTER PROCEDURE SP_TEST AS begin -- процедурка для проверки складских остатков /* написана очень умными сотрудниками склада */ end ^ ... === If we do the same (extraction metadata) but using chcp 65001 and charset = UTF8: C:\TEMP>chcp 65001 Текущая кодовая страница: 65001 C:\TEMP>C:\MIX\firebird\fb30\isql localhost/3333:c:\temp\tmpcp1251_30.fdb -x -ch utf8 1>c:\temp\tmpchcp_30_meta_utf8.log -- then EXCEPTION message will be encoded win OLD charset = WIN1251 and procedure comments - in UTF8 As result, either we can not read text of exceptions or comments from procedure - see attached screenshots. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel