Re: [xml] xmlChar * to char *

On Tue, Oct 24, 2006 at 10:30:37AM +0000, Chris Peto wrote:
Daniel Veillard <veillard <at>> writes:

On Fri, Dec 16, 2005 at 01:41:15PM +0100, Baurzhan Ismagulov wrote:
On Fri, Dec 16, 2005 at 02:59:16AM -0500, Daniel Veillard wrote:
  an xmlChar * has a stricter semantic than char *, that's why
there is a macro to do this in one direction and not in the other one.

But gcc 4 warns about xmlChar * being passed to functions like strcpy; I
think the OP's question was whether there are any other solution than

  no, just cast.

I did a cast and still come up with a string that start with 0xc2.  My original 
character in xsd was &#xB0;.  By parsing I get, even after cast, c2b0 string.  
What must I do?

Learn, really if you're working for a web development company asking this
kind of question should really scare your customers ... I expect there is
some confusion on your side, a pointer cast *never* change the pointed memory.
Things you should read are libxml2 encoding page:

and pages pointed by it giving I18N details and the UTF-8 spec you seems 
to ignore:


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]