Re: Format of string output of a socket server

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi!

"Angus" <nospam@xxxxxxxxx> wrote in message
news:%23TKRV8y5GHA.4484@xxxxxxxxxxxxxxxxxxxxxxx
Well... think I am more confused now than when I asked the question ;)

I am talking about what the server will send. I am getting from these
comments that sending bytes (char) is OK. Basically a string response I
would send would be eg "my response\r\n" - ie byte chars followed by
carriage return line feed. I am supposing this is OK.

In this case you limited to english and if you'll follow Alexander's advise
( utf-8) you can exchange any language strings in the world ,btw utf-8 is
standard xml format.



What for example does your standard POP3 server send? ASCII text just
like
I am saying here?

that base64
Arady

The client program can then convert to Unicode or whatever they see fit?

Angus


"Alexander Nickolov" <agnickolov@xxxxxxxx> wrote in message
news:OZSOk9x5GHA.3452@xxxxxxxxxxxxxxxxxxxxxxx
UNICODE is the only sane choice of course. However, don't
confuse with the Windows meaning of UNICODE which is
really only the UTF-16 representation of UNICODE. I'd
suggest you use UTF-8 representation of UNICODE to avoid
byte-ordering issues on the network. What you return to
your clients is up to you - you just need to do the appropriate
format conversion (e.g. MultiByteToWideChar to get UTF-16
for example).

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

"Angus" <nospam@xxxxxxxxx> wrote in message
news:eXxFh8m5GHA.400@xxxxxxxxxxxxxxxxxxxxxxx
Hello

I am writing a socket server to deliver telephony events to clients on
a
network. For example the telephony server might send out text to
connected
clients. Clients might be written in C/C++, Java, Visual Basic,
anything
in
fact which can talk to a socket.

My socket server is currently sending out char* . Do I have to worry
about
the format of string output? Should I be outputting Unicode? Some
other
format? Or would a C/C++ char* be OK? Will eg Java understand it? Do
they
use UTF-8 or something?

Angus








.



Relevant Pages

  • Re: Format of string output of a socket server
    ... What for example does your standard POP3 server send? ... The client program can then convert to Unicode or whatever they see fit? ... I am writing a socket server to deliver telephony events to clients on ... My socket server is currently sending out char*. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Format of string output of a socket server
    ... a socket can ONLY send bytes. ... What for example does your standard POP3 server send? ... The client program can then convert to Unicode or whatever they see fit? ... I am writing a socket server to deliver telephony events to clients on ...
    (microsoft.public.win32.programmer.networks)
  • OT: (sort of) controlling the PC via SMS
    ... I needed a way to send commands to the server. ... Of course ANY command will be executed by the PC, this just being an innocent example.. ... int readline(FILE *file, char *contents) ...
    (sci.electronics.design)
  • Re: Format of string output of a socket server
    ... What for example does your standard POP3 server send? ... The client program can then convert to Unicode or whatever they see fit? ... confuse with the Windows meaning of UNICODE which is ... your clients is up to you - you just need to do the appropriate ...
    (microsoft.public.win32.programmer.networks)
  • Re: using access schema ini with DTS
    ... and yes I refresh the access database... ... SQL Server and with a scheduled event. ... Col2="PartNumber" Char Width 16 ... Underneath the covers of a DTS ...
    (microsoft.public.sqlserver.dts)