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
LOWER() + SUBSTR() do not give correct result (but SUBSTR() + LOWER() does) [CORE4410] #4732
Comments
Commented by: @WarmBooter The result of lower depends on the charset you are using. What charset you have tried? |
Commented by: Sean Leyne (seanleyne) What is the result if you reverse the order of the operations to SUBSTR, LOWER? |
Commented by: christophe derenne (cdr60530) Hi, select substr(lower('JoËl'),3,3) from rdb$database; is working but this syntax is not corresponding to what I want to do in my stored procedure. |
Commented by: Sean Leyne (seanleyne) 1- This points out that the problem is not with LOWER() but with SUBSTR(), so the case title/subject should be changed. 2- Although this may not be how you SP is coded, changing the sequence of operation at least provides a workaround to the problem. |
Commented by: christophe derenne (cdr60530) At first, the title was about the lower fonction but Sean Leyne ask me to change the title beacause if substr is using after lower, it give the right result, so, substr that has probably a bug inside and not the lower function. |
Modified by: christophe derenne (cdr60530)summary: lower function does not get lowercase in some case => substr function stop lower function to give the correct result |
Modified by: Sean Leyne (seanleyne)summary: substr function stop lower function to give the correct result => LOWER() + SUBSTR() do not give correct result (but SUBSTR() + LOWER() does) |
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: @asfernandes "substr" is legacy UDF function which should not be used. Use SUBSTRING(x from y to z) which surely will work better with charsets and collations. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Commented by: christophe derenne (cdr60530) Hi, I'm surprised, because I love Firebird, this is a greate DBRM with very good performance for free. I'm using it since 15 years (before Firebird, I was using Interbase). But what ? You are saying that substr function is buggy , will continue to exist wand will never be fixed ! I can't believe that, you should say, will be fixed later or will be deprecated : i would understand |
Submitted by: christophe derenne (cdr60530)
Let's try :
select lower('JoËl') from rdb$database; result : joël : that's ok
Now let's try
select lower('Ë') from rdb$database; result : ë: that's ok
Now let's try
select lower(substr('JoËl',3,3)) from rdb$database; result : Ë : THAT IS WRONG
The text was updated successfully, but these errors were encountered: