Forum Home
Press F1
 
Thread ID: 48135 2004-08-15 02:30:00 Are NetBios names case-sensitive? (Delphi 7) Bletch (244) Press F1
Post ID Timestamp Content User
261811 2004-08-15 02:30:00 Hi,

I am developing a network app using Delphi 7 and the INDY networking components. I am having problems with the NetBios names the app server uses to communicate with and sort the client PC names. I have tried using

'Name := AnsiUpperCase(Name);'

to convert all the names to uppercase, and this seemed to work, except I am still having communication problems. The app went fine until I added a feature to allow the server to invite client PCs to open a connection.
The thing I want to know is: Are NetBios names case-sensitive, or do the INDY 'IdTCPServer' or 'IdTCPClient' components have a problem with case-sensitive matches?

Cheers,
Bletch
Bletch (244)
261812 2004-08-15 03:39:00 I don't know.:D

I do know that anything to do with characters through communication links gives rise t0o endless entertainment. ;-) You may think that there is "ASCII". (Well there's EBCDIC, and Murray, and ...).

There is 8 bits no parity. There is 8 bits odd parity. There is 8 bits even parity. There is 8 bits parity on, and there is 8 bits parity off. There is 7 bits ... :_| . Each of these gives you one octet (8-bit "byte") per character. Then there's Unicode ...

Working with strings of characters gets interesting.

Your uppercasing is probably a wise precaution ... although MS stuff seems to prefer upercase, though it usually accepts lower.

My approach has always been to look at the bits. That is, I don't trust any editor which just shows me "characters". It is making assumptions. I look at the actual bits in each byte (I prefer octal code, but I have used hex). Can you write the strings you get from the clients into a file, then look at that with a "hex editor". Vern Buerg's LIST.COM ( a wonderful free tool) can display text with the hex of the codes to the righthand side. Nortons Utility had one too. Or even the old DOS DEBUG.

You may see that some clients are giving you funny codes. Once you find something like that it's easy to bash the characters into a standard form (with AND and OR).
Graham L (2)
261813 2004-08-15 04:14:00 I found the problem, and now I feel really stupid. It was a case-sensitive comparason of two hostname strings (one sent over the network, the other not). The network one had been uppercased, but I didn't think to do the same to the local version.

Bletch :(
Bletch (244)
1