From: <fs...@us...> - 2013-08-27 17:04:04
|
Revision: 58550 http://sourceforge.net/p/firebird/code/58550 Author: fsg Date: 2013-08-27 17:04:00 +0000 (Tue, 27 Aug 2013) Log Message: ----------- enable UTF8 support for the new editline version and isql Modified Paths: -------------- firebird/trunk/builds/posix/Makefile.in.extern.editline firebird/trunk/extern/editline/src/eln.c firebird/trunk/src/isql/isql.epp Modified: firebird/trunk/builds/posix/Makefile.in.extern.editline =================================================================== --- firebird/trunk/builds/posix/Makefile.in.extern.editline 2013-08-27 00:31:14 UTC (rev 58549) +++ firebird/trunk/builds/posix/Makefile.in.extern.editline 2013-08-27 17:04:00 UTC (rev 58550) @@ -62,7 +62,7 @@ libeditline : $(LIB)/libedit.a $(LIB)/libedit.a: - cd $(ROOT)/extern/editline; chmod +x configure; ./configure --enable-static --disable-shared + cd $(ROOT)/extern/editline; chmod +x configure; ./configure --enable-static --disable-shared --enable-widec $(MAKE) -C $(ROOT)/extern/editline cp $(ROOT)/extern/editline/src/.libs/libedit.a $(LIB) Modified: firebird/trunk/extern/editline/src/eln.c =================================================================== --- firebird/trunk/extern/editline/src/eln.c 2013-08-27 00:31:14 UTC (rev 58549) +++ firebird/trunk/extern/editline/src/eln.c 2013-08-27 17:04:00 UTC (rev 58550) @@ -75,10 +75,12 @@ el_gets(EditLine *el, int *nread) { const wchar_t *tmp; - - el->el_flags |= IGNORE_EXTCHARS; +//we don't want to ignore extended chars with UTF8 charsets /FSG 20011 + if (!(el->el_flags & CHARSET_IS_UTF8)) + el->el_flags |= IGNORE_EXTCHARS; tmp = el_wgets(el, nread); - el->el_flags &= ~IGNORE_EXTCHARS; + if (!(el->el_flags & CHARSET_IS_UTF8)) + el->el_flags &= ~IGNORE_EXTCHARS; return ct_encode_string(tmp, &el->el_lgcyconv); } Modified: firebird/trunk/src/isql/isql.epp =================================================================== --- firebird/trunk/src/isql/isql.epp 2013-08-27 00:31:14 UTC (rev 58549) +++ firebird/trunk/src/isql/isql.epp 2013-08-27 17:04:00 UTC (rev 58550) @@ -83,6 +83,7 @@ // This is a local file included in our distribution - but not always // compiled into the system #include "editline.h" +#include <locale.h> #endif enum literal_string_type @@ -532,6 +533,9 @@ isqlGlob.major_ods = 0; isqlGlob.minor_ods = 0; +#ifdef HAVE_EDITLINE_H + setlocale(LC_CTYPE, ""); +#endif int rc = ISQL_main(argc, argv); return rc; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |