Re: [Firebird-devel] Char values padding

2016-06-28 Thread Adriano dos Santos Fernandes
On 28/06/2016 16:46, Jiří Činčura wrote: >>> OK, you cracked my confidence. The length from metadata is what? >>> a) length in bytes of declared field >>> b) length in chars of declared field >>> c) length of bytes I should read >> It's (a). > Bummer. BTW do I get it correctly that using Procedure:

Re: [Firebird-devel] Char values padding

2016-06-28 Thread Jiří Činčura
> > OK, you cracked my confidence. The length from metadata is what? > > a) length in bytes of declared field > > b) length in chars of declared field > > c) length of bytes I should read > It's (a). Bummer. BTW do I get it correctly that using Procedure::getCharSet with hardcoded UTF-8, I'm askin

Re: [Firebird-devel] Char values padding

2016-06-28 Thread Adriano dos Santos Fernandes
On 28/06/2016 14:45, Jiří Činčura wrote: > OK, you cracked my confidence. The length from metadata is what? > a) length in bytes of declared field > b) length in chars of declared field > c) length of bytes I should read It's (a). > I supposed it's c) and I was not thinking it could be otherwise.

Re: [Firebird-devel] Char values padding

2016-06-28 Thread Jiří Činčura
OK, you cracked my confidence. The length from metadata is what? a) length in bytes of declared field b) length in chars of declared field c) length of bytes I should read I supposed it's c) and I was not thinking it could be otherwise. :) And when I created the string from the bytes - given it's

Re: [Firebird-devel] Char values padding

2016-06-28 Thread Adriano dos Santos Fernandes
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

Re: [Firebird-devel] Char values padding

2016-06-28 Thread Jiří Činčura
> 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. -- Mgr. Jiří

Re: [Firebird-devel] Char values padding

2016-06-28 Thread Adriano dos Santos Fernandes
On 28/06/2016 11:01, Jiří Činčura wrote: > Hi *, > > should I pad char values to defined length in external engine plugin? > Currently I'm not doing it and server seems to be doing it for me, but > better to know for sure. > You'd better change the message metadata with the help of the builder from

[Firebird-devel] Char values padding

2016-06-28 Thread Jiří Činčura
Hi *, should I pad char values to defined length in external engine plugin? Currently I'm not doing it and server seems to be doing it for me, but better to know for sure. -- Mgr. Jiří Činčura Independent IT Specialist