Re: [firebird-support] How to store a string in Firebird which includes #0's in it?

2018-08-04 Thread Chuck Belanger phytot...@lanset.com [firebird-support]
Got it! Thanks. Chuck On 8/4/2018 5:11 AM, Mark Rotteveel m...@lawinegevaar.nl [firebird-support] wrote: > On 4-8-2018 13:05, Chuck Belanger phytot...@lanset.com > [firebird-support] wrote: >> This worked beautifully. Thank you! >> >> There was no need to change my code, simply add a new

Re: [firebird-support] How to store a string in Firebird which includes #0's in it?

2018-08-04 Thread Chuck Belanger phytot...@lanset.com [firebird-support]
Thank you, River, I very much appreciate the tutorial. Chuck On 8/4/2018 3:59 AM, 'River~~' river14ap...@gmail.com [firebird-support] wrote: Hi again Chuck Sorry I was a bit cryptic there. There follows a quick primer in logical bitwise operations If it helps, use it. If not, code the

Re: [firebird-support] How to store a string in Firebird which includes #0's in it?

2018-08-04 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 4-8-2018 15:06, 'River~~' river14ap...@gmail.com [firebird-support] wrote: > You are pedantically correct but... > > ALL storage in ALL modern computers is in binary. This may sounds pedantic, but it is not in my opinion. I have seen enough systems storing binary data by encoding it using

Re: [firebird-support] How to store a string in Firebird which includes #0's in it?

2018-08-04 Thread 'River~~' river14ap...@gmail.com [firebird-support]
Hi Mark. You are pedantically correct but... ALL storage in ALL modern computers is in binary. When we declare a field as integer, char, octet, etc we are specifying two things: how it is presented and what manipulation we can do on it. To say an octet is in hex is no more wrong than to say

Re: [firebird-support] How to store a string in Firebird which includes #0's in it?

2018-08-04 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 4-8-2018 13:05, Chuck Belanger phytot...@lanset.com [firebird-support] wrote: > This worked beautifully. Thank you! > > There was no need to change my code, simply add a new OCTETS based > Domain and change domains on the field. All the Char(0)s are stored as > 0's in what looks like a HEX

Re: [firebird-support] How to store a string in Firebird which includes #0's in it?

2018-08-04 Thread Chuck Belanger phytot...@lanset.com [firebird-support]
This worked beautifully. Thank you! There was no need to change my code, simply add a new OCTETS based Domain and change domains on the field. All the Char(0)s are stored as 0's in what looks like a HEX based number. Chuck On 8/4/2018 1:54 AM, Dimitry Sibiryakov s...@ibphoenix.com

Re: [firebird-support] How to store a string in Firebird which includes #0's in it?

2018-08-04 Thread 'River~~' river14ap...@gmail.com [firebird-support]
Hi again Chuck Sorry I was a bit cryptic there. There follows a quick primer in logical bitwise operations If it helps, use it. If not, code the "top bit setting" any way that makes sense to you. I would always recommend you code it the way you understand rather than the way some geeky C

Re: [firebird-support] How to store a string in Firebird which includes #0's in it?

2018-08-04 Thread Chuck Belanger phytot...@lanset.com [firebird-support]
Thank you, I will try that first. Chuck On 8/4/2018 2:46 AM, Dimitry Sibiryakov s...@ibphoenix.com [firebird-support] wrote: > 04.08.2018 11:44, Chuck Belanger phytot...@lanset.com [firebird-support] > wrote: >> As far as I know NONE or OCTET is the closest thing to rawbyte, but as I >>

Re: [firebird-support] How to store a string in Firebird which includes #0's in it?

2018-08-04 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
04.08.2018 11:44, Chuck Belanger phytot...@lanset.com [firebird-support] wrote: > As far as I know NONE or OCTET is the closest thing to rawbyte, but as I > mentioned (and > another responded) the string is being truncated at the first #0. Yes, that's the case for charset NONE. OCTETS must

Re: [firebird-support] How to store a string in Firebird which includes #0's in it?

2018-08-04 Thread Chuck Belanger phytot...@lanset.com [firebird-support]
Thank you guys for your thoughtful response! I really like the idea of just using 7 bits and keeping the 8th a '1', thus ruling out the possibility of ever having a #0. It is an easy conversion in my routine and storage. As far as I know NONE or OCTET is the closest thing to rawbyte, but as

Re: [firebird-support] How to store a string in Firebird which includes #0's in it?

2018-08-04 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
04.08.2018 0:49, Chuck Belanger phytot...@lanset.com [firebird-support] wrote: > The above string is created and > stored in a string just as you see it, but how do I store it in Firebird > , preferably as-is in a table field? Use field (VAR)CHAR CHARACTER SET OCTETS. Then "just store" your

Re: [firebird-support] How to store a string in Firebird which includes #0's in it?

2018-08-04 Thread 'River~~' river14ap...@gmail.com [firebird-support]
Hi Chuck I am a Firebird newbie so don't know if Fbd will let you do what you want. Perhaps there is a fixed length raw byte field you could use, or perhaps a blob? If it does not, then a more efficient work around than the one yours would be to store only seven bits to a byte, forcing the top