Marc Lehmann skribis 2007-03-31 0:25 (+0200): > If you send a compressed string over the network using JSON and decompress > it, you need to know that. Does JSON compress arbitrary data? If so, then the user must do the decoding and encoding, because arbitrary data only exists in byte form. Once you dictate any specific encoding, it's no longer arbitrary. On the other hand, if JSON does text data only, it can just use any UTF encoding on both sides, and document it like that. Unless both sides are exactly the same platform (e.g. both Perl), you need to establish a protocol for sending data anyway. And that protocol should also describe encoding. If sender and receiver don't agree, you have a problem. > I am really frustrated at that. It makes perl as a whole rather > questionable for unicode use, as you constantly have to think about > the internals. And yes, that simply shouldn't be the case. I maintain that it isn't the case, for almost any programming job, unless you're indeed doing things with internals. -- korajn salutojn, juerd waalboer: perl hacker <juerd@juerd.nl> <http://juerd.nl/sig> convolution: ict solutions and consultancy <sales@convolution.nl> Ik vertrouw stemcomputers niet. Zie <http://www.wijvertrouwenstemcomputersniet.nl/>.Thread Previous | Thread Next