X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 8CEAD11F61BB for ; Fri, 31 Mar 2006 15:09:13 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 94262-02 for ; Fri, 31 Mar 2006 15:09:12 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by postgresql.org (Postfix) with ESMTP id 5C55411F602E for ; Fri, 31 Mar 2006 15:09:11 -0400 (AST) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FPOzG-0004vm-Ug for pgsql-odbc@postgresql.org; Fri, 31 Mar 2006 21:08:47 +0200 Received: from 83.145.96.118 ([83.145.96.118]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 31 Mar 2006 21:08:46 +0200 Received: from Marc.Herbert by 83.145.96.118 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 31 Mar 2006 21:08:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-odbc@postgresql.org From: Marc Herbert Subject: Re: Unicode is not UTF-8. was :psqlODBC-Driver Test / text Date: Fri, 31 Mar 2006 21:12:13 +0200 Lines: 23 Message-ID: References: <442C3452.5020704@online.de> <442C4F10.3090004@tpf.co.jp> <442D5DFB.4080501@online.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 83.145.96.118 User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4 (Jumbo Shrimp, linux) Cancel-Lock: sha1:28NB0v9uFey7NA3C5QuIZztnCzM= X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.354 required=5 tests=[AWL=0.101, RCVD_NUMERIC_HELO=1.253] X-Spam-Score: 1.354 X-Spam-Level: * X-Archive-Number: 200603/239 X-Sequence-Number: 7525 Johann Zuschlag writes: > I've read about the problems with the NULL bytes on Unix machines. This problem is not related to Unix at all but to the programming language used. Most standard C functions use the zero byte convention as a string terminator, so it becomes a forbidden character in C. On the other hand String objects in C++ and Java use a separate length field, and having NULLs inside a string is a no brainer there. The ODBC API has been designed for C and Cobol. Cobol does not forbid zero as a character either. When browsing the ODBC spec you'll notice it carefully caters for the two ways. Guess which programming language is used PostgreSQL. I suspect unicode does not care at all about this. After all unicode is just about characters not about strings.