It would be nice to have support in HXTT text driver for pascal style strings. The first byte of the field contains the actual length of the string.
e.g. 0x09,'H','E','L','L','O',0x20,0x20,0x20,0x20 is 'HELLO '
Any thoughts on this?
Thanks,
Martin
|
It means that pascal style strings will have a variable length from 0~255?
|
What's your data file sample?
|
Yes.
This style string is used in many MacIntosh apps (pre OS8/9) and in many old DOS packages based on Turbo Pascal. Alot of what we use HXTT app for is extracting data from old unsupported packages.
|
v2.3.022 supports Pascal Style Strings:)
For instance:
create table abc (Symbol longvarchar default 'pascalstring' ,RepDate date
('dd-MMM-yy'),Name longvarchar default 'pascalstring',Open NUMERIC(8,2));
insert into abc values('aaa','2006-07-08','bbbb',56);
insert into abc values('aaa','2007-07-08',null,33.332);
select * from abc;
The key is to use longvarchar(or longvarbinary) default 'pascalstring' for all columns of Pascal style strings.
BTW, PasToJava, JavaToPas,PasToJava,CToPas,CToJava, and JavaToC funtions are provided for conversion between null-terminated string, Pascal-style string, and Java string.
longvarchar default '\0' is used for null-terminated string.
|