Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login

    Import + UTF8-Dateien

    Scheduled Pinned Locked Moved Entwicklung
    5 Posts 2 Posters 1.8k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      crispp
      last edited by

      Mit UTF-8-Dateien (oder besser, Datei, die UTF-8-Inhalte haben, aber nicht den korrekten UTF-8-Header haben) hat der Import (oder schon das Inventory) irgendwie auch so seine Probleme:

      • Loading module: import

        • Logging in

        • Connected to mandator: 81 ()

        • Logged in as: xxxxxx

        • –----------------------------------------------

        • i-doit import

        • –----------------------------------------------

        • Import-Handler initialized (2009-08-21 10:10:09)

        • Loading Import: imports/sample_utf8.xml of type inventoryPHP Warning:  SimpleXMLElement::__construct(): Entity: line 79: parser error : Input is not proper UTF-8, indicate encoding !
          Bytes: 0xFD 0x3C 0x2F 0x6E in /srv/www/htdocs/servers/i-doit/src/classes/import/isys_import_xml.class.php on line 91
          PHP Warning:  SimpleXMLElement::__construct(): 1C(P) PCI-E Gigabit Ethernet NIC - Paket Zamanlayýcýsý Mini Baðlantý Noktas in /srv/www/htdocs/servers/i-doit/src/classes/import/isys_import_xml.class.php on line 91
          PHP Warning:  SimpleXMLElement::__construct():                                                                                ^ in /srv/www/htdocs/servers/i-doit/src/classes/import/isys_import_xml.class.php on line 91
          PHP Fatal error:  Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /srv/www/htdocs/servers/i-doit/src/classes/import/isys_import_xml.class.php:91
          Stack trace:
          #0 /srv/www/htdocs/servers/i-doit/src/classes/import/isys_import_xml.class.php(91): SimpleXMLElement->_construct('#1 /srv/www/htdocs/servers/i-doit/src/handler/isys_handler_import.class.php(244): isys_import_xml->load_import('imports/sample...')
          #2 /srv/www/htdocs/servers/i-doit/src/handler/isys_handler_import.class.php(300): isys_handler_import->process()
          #3 /srv/www/htdocs/servers/i-doit/controller.php(329): isys_handler_import->init()
          #4 {main}
            thrown in /srv/www/htdocs/servers/i-doit/src/classes/import/isys_import_xml.class.php on line 91

        nach der Konvertierung in UTF-8

        PHP Warning:  SimpleXMLElement::__construct(): Entity: line 85: parser error : Opening and ending tag mismatch: name line 79 and co
        ponent in /srv/www/htdocs/servers/i-doit/src/classes/import/isys_import_xml.class.php on line 91
        PHP Warning:  SimpleXMLElement::__construct(): in /srv/www/htdocs/servers/i-doit/src/classes/import/isys_import_xml.cl
        ss.php on line 91
        PHP Warning:  SimpleXMLElement::__construct():            ^ in /srv/www/htdocs/servers/i-doit/src/classes/import/isys_import_xml.c
        ass.php on line 91
        PHP Warning:  SimpleXMLElement::__construct(): Entity: line 113: parser error : Opening and ending tag mismatch: name line 110 and
        omponent in /srv/www/htdocs/servers/i-doit/src/classes/import/isys_import_xml.class.php on line 91
        PHP Warning:  SimpleXMLElement::__construct(): in /srv/www/htdocs/servers/i-doit/src/classes/import/isys_import_xml.cl
        ss.php on line 91
        PHP Warning:  SimpleXMLElement::__construct():            ^ in /srv/www/htdocs/servers/i-doit/src/classes/import/isys_import_xml.c
        ass.php on line 91
        .....

        Beispiel XML anbei
        sample_utf8.txt

      1 Reply Last reply Reply Quote 0
      • dsD Offline
        ds
        last edited by

        Hmm was hast du mit der Date genau gemacht? Eventuell mal geöffnet mit einem Editor?
        Die ist nämlich einfach kaputt - Egal wie ich sie kodiere, das XML kann nicht richtig geparsed werden.

        1 Reply Last reply Reply Quote 0
        • C Offline
          crispp
          last edited by

          Gemacht habe ich damit nichts …. ist nur auf einem türkischen Windows generiert worden.

          1 Reply Last reply Reply Quote 0
          • dsD Offline
            ds
            last edited by

            Achso. Kannst du feststellen mit welchem Zeichensatz die Dateien dort erstellt werden?

            1 Reply Last reply Reply Quote 0
            • C Offline
              crispp
              last edited by

              Der Font wird wohl der Systemfont gewesen sein. Ansonsten gibt mir einen Tipp, wo ich da schauen soll…..

              Das Problem scheint der fehlende UTF-8-Header in der Textdatei zu sein. Müßte somit dann eigentlich von dem VBS-Script schon mit UTF-8-Header geschrieben werden.

              Importiert werden die Sachen mit vorhandenem UTF-8-Header; die Sonderzeichen werden aber nicht korrekt dargestellt (oder auch nicht korrekt importiert).

              Anbei noch ein Beispiel mit chinesischen Zeichen.... (z.B. bei den Anwendungen werden nur Fragezeichen angezeigt).

              ansiheader-1026432.txt
              utf8header-1091704.txt

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post