Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

character sequence in dBase 5

Status
Not open for further replies.

padavies

Programmer
Dec 7, 2006
3
GB
Is it possible to use ascii character sequence in logic and indexing?
I'm migrating from dB3+ where '@' < 'A' to dB5 where the reverse is true and all my logic is shot as I use '@' a lot!

 
A is ASCII 65
@ is ASCII 64

It is always so.

Both of these are OK with indexing and sorting. Non printable characters and control characters are a different issue
 
Thanks for your reply.

I know A is 65 and @ 64 which is why I chose @ for 'below A wihout going to numbers'. The problem is that indexing puts my @ keys to the end, and in logic such as 'if zone > "U"' the @ zone data gets included in the '> U' data. I've proved it by printing @ data which is treated as '> U' data.
I created a DBF with all the characters from 32 to 255 and indexed it to find out the new positioning and it was interesting. The accented characters follow their plain versions so Éire now appears ahead of France instead of at the end. @ appears after all the alphabetics.

dB5 help just says under both ANSI and ASCII that "Windows products use the ANSI character set". It was fine in dB3+ which is DOS based, and I was hoping there was a backward compatibility option which would allow me to continue using ASCII sequencing. I've changed the logic in one zone-sensitive program (Christmas card addressing) as I'm loath to change my data.
 
codepage? I thought they were just for web stuff. Where would I find what codepage I'm using in dB5?
 
Check also the COLLATE setting. Different COLLATE settings will give different sort results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top