[xml] xmlCheckUTF8-problem [signed]



Hi,
i just updated to libxml 2.6.12 and became problems with the function xmlCheckUTF8(). This function returns false even if the string is a valid utf8-string, which can easily be translated to isolat with the function UTF8Toisolat1. Im not quite sure whether this has something to do with: http://bugzilla.gnome.org/show_bug.cgi?id=148115
Any suggestions?

Thank you
/Julius
-----------------------------------------------------
#include <libxml/parser.h>

int main (int i,char** s) {
  const xmlChar* utf = "Köchin";
  int utflen         = xmlStrlen(utf);
  unsigned char* lat = (unsigned char*) malloc(utflen);
  int latlen;

  if(xmlCheckUTF8 (utf))
    printf("valid utf8\n");
  else
    printf("no valid utf8\n");

  UTF8Toisolat1(lat,&latlen,(unsigned char*)utf,&utflen);
  lat[latlen]=0x00;

  printf("%s: %s -> %s\n",LIBXML_DOTTED_VERSION,utf,lat);

  return 0;
}
---------------------------------------------------
[chef bruce test]$ ./test
no valid utf8
2.6.12: Köchin -> Köchin
---------------------------------------------------


--
---------------------[ Ciphire Signature ]----------------------
From: julius muenchen-sued de signed email body (892 characters)
Date: on 27 August 2004 at 13:54:00 GMT
To:   xml gnome org
----------------------------------------------------------------
: The message above has been secured using Ciphire Mail.
: Verify this signature and download your free encryption
: software at www.ciphire.com. The three garbled lines
: below are the sender's verifiable encoded signature.
----------------------------------------------------------------
00fAAAAAEAAAD4PC9BfAMAAKACAAIAAgACACCmPgNAJQoFEAwysJwtcX5m05sj5F
cuq6WfqRmNBGuajQEAB8ZV8kQLz9eHXt1kqpjkBfkmIa/UpvlGUjvMKJl/qx8ViB
8XNn4QnJjbteZIl5UFZjSmGZgkgNrL+i/u+KsCMw==
------------------[ End Ciphire Signed Message ]----------------




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