Kaixo! On Thu, Sep 19, 2002 at 11:35:33AM +0100, Martin Kochanski wrote: > Magnificent - thank you - that sorts everything out! It certainly > seems safer to assume that server filesystems use UTF8
No, it is safer to simply disregard the encoding of the filesystem. It is irrelevant for a client/server protocol (only what happens between the client and the server matters). Now, the storage in the filesystem is only a problem for the server, the clien(s) don't need to know about it. And, as a data in a client/server system is to primarly be used in the client/server interactions, it isn't very important that locally in the server machine the file names can display strangely by utilities that have nothing to do with the protocol. So, for that reason, it is simpler to just store the file names in utf-8, and shamesly disregard what can happen on the host system, it is not the server business (if the host system were actually unable to store in utf-8 (eg: an hypothetic system limited to only ascii) then it could use a gigantic file, used as a filesystem managed by the server; but that is independent of the client/server relationship, those are problems only present for the server (and for a given implementation of it) and they must be isolated and clients and other servers must not know about them. Now, on GNU/Linux systems (and probably on all Unix systems as well), it is possible to: a) store file names with any byte sequence (minus "\0" and "/"), in particular a byte sequence corresponding to valid utf-8. and b) it is possible to set the system to use an UTF-8 locale so the names can also be properly seen by other independent tools. It is not exactly as "supposing the server stores in utf-8". But: "we don't care how the server store, we *transmit* in utf-8". It is the server job to ensure it transmits in utf-8; if the server wants to store in iso-8859-1 or in ebcdic it can, but it has to convert to utf-8 for transmission; storing in utf-8 directly is simpler. > Sorry I can't thank you in Basque... "eskerrik asko" :) -- Ki �a vos v�ye b�n, Pablo Saratxaga http://chanae.stben.be/pablo/ PGP Key available, key ID: 0xD9B85466 [you can write me in Walloon, Spanish, French, English, Italian or Portuguese]
msg03162/pgp00000.pgp
Description: PGP signature
