From owner-freebsd-geom@FreeBSD.ORG Wed Mar 7 16:47:25 2007 Return-Path: X-Original-To: freebsd-geom@freebsd.org Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5101616A402; Wed, 7 Mar 2007 16:47:25 +0000 (UTC) (envelope-from db@bsdsystems.de) Received: from fop.bsdsystems.de (static.88-198-57-43.clients.your-server.de [88.198.57.43]) by mx1.freebsd.org (Postfix) with ESMTP id 15BE113C4B6; Wed, 7 Mar 2007 16:47:25 +0000 (UTC) (envelope-from db@bsdsystems.de) Received: from [172.16.1.13] (e176102097.adsl.alicedsl.de [85.176.102.97]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by fop.bsdsystems.de (Postfix) with ESMTP id 77D5D2BE9E; Wed, 7 Mar 2007 17:29:37 +0100 (CET) Message-ID: <45EEE870.2040706@bsdsystems.de> Date: Wed, 07 Mar 2007 17:29:36 +0100 From: Dennis Berger User-Agent: Thunderbird 2.0b2 (Windows/20070116) MIME-Version: 1.0 To: doug steinwand References: <45ED8E88.5080400@nipsi.de> <20070307151026.GA55527@dzs.fx.org> In-Reply-To: <20070307151026.GA55527@dzs.fx.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: bug-followup@FreeBSD.org, freebsd-geom@freebsd.org Subject: Re: kern/104389: [geom] [patch] sys/geom/geom_dump.c doesn't encode XML entities X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2007 16:47:25 -0000 Yes I found this version much better than the one before. regards, -Dennis doug steinwand schrieb: > * Dennis Berger [2007-03-06 16:53:44 +0100]: > >> This way we can escape all illegal characters. >> What do you suggest? >> > > The gstat and other geom applications basically use expat to parse > the equivalent of "sysctl -b kern.geom.confxml". This output does > not have an encoding specified, so expat accepts only ASCII. As > such, bytes greater than 0x7e must be encoded. > > http://skew.org/xml/tutorial/ > http://www.w3.org/TR/1998/REC-xml-19980210 > > Attached is a patch which attempts to output valid XML for all cases > (any value between 0x00 and 0xff). One issue is that many bytes > between 0x00 and 0x1f have no valid XML coding, so this patch > replaces them with '?' (such things should not appear in geom names, > though). > > Also, it seems that expat is attempting to convert bytes from > iso-8859-1 into utf8 characters, so gstat and glabel output may > look weird. > > - doug > > ------------------------------------------------------------------------ > > _______________________________________________ > freebsd-geom@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-geom > To unsubscribe, send any mail to "freebsd-geom-unsubscribe@freebsd.org" -- Dennis Berger BSDSystems Eduardstrasse 43b 20257 Hamburg Phone: +49 (0)40 54 00 18 17 Mobile: +49 (0) 179 123 15 09 E-Mail: db@bsdsystems.de