diff options
| author | Thies C. Arntzen <thies@php.net> | 2001-08-12 18:44:42 +0000 |
|---|---|---|
| committer | Thies C. Arntzen <thies@php.net> | 2001-08-12 18:44:42 +0000 |
| commit | d5b1a7f440755f2ca94764ef0c7f1122c7d97e44 (patch) | |
| tree | 349b40f4ea3f00fa0f2865ac0ceab84104d86296 /ext/xml/tests | |
| parent | f5c59863441ac2bb775d0dadfca03524327ea16e (diff) | |
| download | php-git-d5b1a7f440755f2ca94764ef0c7f1122c7d97e44.tar.gz | |
tags need to be UTF8-decoded as well.
guys, case_folding can only work when the parser target encoding equal (or
compatible) with the locale setting of the system as we use toupper to "do it"
Diffstat (limited to 'ext/xml/tests')
| -rw-r--r-- | ext/xml/tests/007.phpt | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/ext/xml/tests/007.phpt b/ext/xml/tests/007.phpt new file mode 100644 index 0000000000..1bff1dee0e --- /dev/null +++ b/ext/xml/tests/007.phpt @@ -0,0 +1,42 @@ +--TEST-- +xml_parse_into_struct/umlauts in tags +--SKIPIF-- +<?php include("skipif.inc"); ?> +--FILE-- +<?php +function startHandler($parser,$tag,$attr) { var_dump($tag,$attr); } +function endHandler($parser,$tag) { var_dump($tag); } + +$xmldata = '<?xml version="1.0" encoding="ISO-8859-1"?><äöü üäß="Üäß">ÄÖÜ</äöü>'; +$parser = xml_parser_create('ISO-8859-1'); +xml_set_element_handler($parser, "startHandler", "endHandler"); +xml_parse_into_struct($parser, $xmldata, $struct, $index); +var_dump($struct); +?> +--GET-- +--POST-- +--EXPECT-- +string(3) "ÄÖÜ" +array(1) { + ["ÜÄß"]=> + string(3) "Üäß" +} +string(3) "ÄÖÜ" +array(1) { + [0]=> + array(5) { + ["tag"]=> + string(3) "ÄÖÜ" + ["type"]=> + string(8) "complete" + ["level"]=> + int(1) + ["attributes"]=> + array(1) { + ["ÜÄß"]=> + string(3) "Üäß" + } + ["value"]=> + string(3) "ÄÖÜ" + } +} |
