On 28/06/2016 13:46, Jiří Činčura wrote: >> You'd better change the message metadata with the help of the builder >> from char to varchar and so plugin and engine exchange correct lengths >> instead of let each part to calculate it for multibyte charsets. > Why? I'm getting the length from metadata, I don't have to compute it. > So then you have:
charset: utf-8 byte length: 40 max bytes per char in utf-8: 4 So you deduce: char length: 10 Ok. But you receive a string of 40 bytes. If these CHAR(10) string is filled with ASCII chars, you should read 10 bytes from it to construct the dotNet String. If these CHAR(10) string is filled with exotic chars, you should read up to 40 bytes from it to construct the dotNet String. Do you like to interpret this string? You could just declare it (via the builder) as being VARCHAR and the engine will pass the byte length for you. Adriano ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
