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
Non-utf8 input from stdin in isql seems broken on linux [CORE5409] #5682
Comments
Modified by: @artyom-smirnovVersion: 3.0.1 [ 10730 ] |
Modified by: @AlexPeshkoffassignee: Alexander Peshkov [ alexpeshkoff ] |
Commented by: @AlexPeshkoff Could not reproduce: localhost bin # cat test775.sql | ./isql -ch dos775 -u sysdba -p masterkey localhost:/tmp/test.fdb |
Commented by: @artyom-smirnov I can reproduce it on current 3.0 official binaries and own build with supplied editline library (external/editline). Can not reproduce it with --without-editline and --with-system-editline. |
Commented by: @AlexPeshkoff I tend to treat an ability to accept from stdin characters missing in selected locale as library implementation detail. Moreover what we have it builtin editline (skip such characters) looks better for me. I could not test with dos775 (my box is missing that particular locale) but I've tried with cp1251 (windows cyrillic) and if I set correct locale editline works fine: localhost bin # export LANG=be_BY Compare with: localhost bin # export LANG=en_US.UTF-8 |
Submitted by: @artyom-smirnov
Prepare file in some non-utf8 encoding. Found this example text in fbt-repository:
echo 'recreate table "ĄČĘĢÆĖŠŚÖÜØ£"(
"ąčęėįšųūž" varchar(50) character set dos775
,"Õisu ja kariste järved" blob sub_type 1 character set dos775
);' | iconv -f utf8 -t cp775 > test775.sql
Try to execute it from stdin:
cat test775.sql | bin/isql -ch dos775 -u sysdba -p masterkey localhost:/tmp/test.fdb
Use CONNECT or CREATE DATABASE to specify a database
And we will get error:
Expected end of statement, encountered EOF
The text was updated successfully, but these errors were encountered: