cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conny Krappatsch <co...@smb-tec.com>
Subject Re: XML Compilation
Date Wed, 18 Oct 2000 18:04:09 GMT
Hi,

the code below is a snippet out of the zip file you attached. Looks like you're
encoding 0x0000 as 2 octets. Is this for any reason or just a typo???

Conny

Stefano Mazzocchi wrote:
> if ((c >= 0x0001) && (c <= 0x007F)) {
>     bytearr[count++] = (byte) c;
> } else if (c > 0x07FF) {
>     bytearr[count++] = (byte) (0xE0 | ((c >> 12) & 0x0F));
>     bytearr[count++] = (byte) (0x80 | ((c >>  6) & 0x3F));
>     bytearr[count++] = (byte) (0x80 | ((c >>  0) & 0x3F));
> } else {
>     bytearr[count++] = (byte) (0xC0 | ((c >>  6) & 0x1F));
>     bytearr[count++] = (byte) (0x80 | ((c >>  0) & 0x3F));
> }

-- 
______________________________________________________________________
Conny Krappatsch                              mailto:conny@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com




Mime
View raw message