php-src/ext/xmlwriter/tests/xmlwriter_toStream_encoding_shiftjis.phpt
Arnaud Le Blanc e63f822e6a
Fix test on alpine/musl (#15072)
When libxml uses musl iconv, GBK encoding is not supported as a target encoding
2024-07-23 16:07:26 +02:00

18 lines
358 B
PHP

--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"?>
<!--‚Ÿ‚Ÿ‚Ÿ-->