1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Fix test on alpine/musl (#15072)

When libxml uses musl iconv, GBK encoding is not supported as a target encoding
This commit is contained in:
Arnaud Le Blanc
2024-07-23 16:07:26 +02:00
committed by GitHub
parent 00e45887fa
commit e63f822e6a
2 changed files with 18 additions and 18 deletions

View File

@@ -1,18 +0,0 @@
--TEST--
XMLWriter::toStream() with encoding - test GBK
--EXTENSIONS--
xmlwriter
--FILE--
<?php
$h = fopen("php://output", "w");
$writer = XMLWriter::toStream($h);
$writer->startDocument(encoding: "GBK");
$writer->writeComment("\u{00E9}\u{00E9}\u{00E9}");
unset($writer);
?>
--EXPECT--
<?xml version="1.0" encoding="GBK"?>
<!--¨¦¨¦¨¦-->

View File

@@ -0,0 +1,18 @@
--TEST--
XMLWriter::toStream() with encoding - test SHIFT_JIS
--EXTENSIONS--
xmlwriter
--FILE--
<?php
$h = fopen("php://output", "w");
$writer = XMLWriter::toStream($h);
$writer->startDocument(encoding: "SHIFT_JIS");
$writer->writeComment("\u{3041}\u{3041}\u{3041}");
unset($writer);
?>
--EXPECT--
<?xml version="1.0" encoding="SHIFT_JIS"?>
<!--‚Ÿ‚Ÿ‚Ÿ-->