Created attachment 129916 [details] Open query "Left" - shows wrong number of characters for fields with special characters. Open the attached database. Open the query "Left". The content of the field "Name" is set to LEFT("Name",3) Shows only the first two characters, if the "Name" has special characters at the beginning of "Name". SELECT "Name", LEFT("Name", 3) FROM "Table" gives Bülgin | Bü Gloria | Glo Örtchen | Ör Works right with HSQLDB, wrong with Firebird. Tested with Version: 5.4.0.0.alpha0+ Build ID: 2a4cd80abcf9e515d1ce3b3a944b573bdc42bff2 CPU Threads: 4; OS Version: Linux 4.1; UI Render: default; VCL: kde4; TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-12-22_00:18:04 Locale: de-DE (de_DE.UTF-8); Calc: group
It's the same behavior with the function "Right". RIGHT('Größe',3) gives 'ße' RIGHT('Größe',4) gives '�ße' - an undefined character, because with UTF8 there will only be read "half" of 'ö'. All tested with OpenSUSE 42.1 64bit rpm Linux.
Ans also the same behavior with every character-function, which depends on the length of a string. Start tools > SQL Copy the following code and execute it: select char_length(_iso8859_1 'Grüß di!') from "Table1" Should return 8, but iso8859_1 isn't installed: firebird_sdbc error: *CHARACTER SET ISO8859_1 is not installed caused by 'isc_dsql_prepare' Counting of characters should work in every language - not only in English. Without this function most of the character-functions are unusable for people, who use special characters as there native language.
Confirmed. Arch Linux 64-bit, KDE Plasma 5 Version: 5.4.0.0.alpha0+ Build ID: fc0d4e6bc43d5f982452df07930f5ecf5927ad22 CPU Threads: 8; OS Version: Linux 4.8; UI Render: default; VCL: kde4; Locale: fi-FI (fi_FI.UTF-8); Calc: group Built on December 31st 2016
Resolved with https://bugs.documentfoundation.org/show_bug.cgi?id=105142 Could confirm with LO 5.4.0.0 from 01-02-2017