On 07/01/2016 12:44, Dimitry Sibiryakov wrote: > 07.01.2016 15:27, Adriano dos Santos Fernandes wrote: >> Now imagine the client passing this: >> >> SQL_TEXT >> length: 40 >> charset: utf-8 >> data: 1234567890<30 spaces> >> >> What char_length should return? > 40. Because the data indeed contain 40 characters.
Just your opinion, nothing more, nothing less. Remember that a CAST(? as CHAR(10) CHARACTER SET OCTETS) is described in the same manner and does not meant to be filled with 40 characters. >> That is the architectural problem. > Architectural problems are not a kind to be attempted to solve at RC stage. I'd want to completely remove SQL_TEXT from sources, but that upset people. >> So basically, the code now in evlCharToUuid is asking to convert the >> user string to a CHAR(36) ASCII, not with the standard convert (slow) >> way, but just checking it. > "Just checking" is a wrong way to convert data into ASCII. Especially from > UTF-8. > Imagine a string, containing 18 non-ascii characters (two bytes each). They > will pass the > check, but "true convert" would raise error because this string in reality > contain > characters that aren't in ASCII and cannot be converted into ASCII. > And the real consequence of that is just a different error message, possible with a less informative one. Adriano ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel