# inconsistency in using utf-8

- Thread: https://externals.io/message/28009
- Original archive: https://news-web.php.net/php.internals/28009
- Started by Mathias Bank on 2007-02-11T21:28:26+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #28009 — Mathias Bank — 2007-02-11T21:28:26+00:00

URL: https://externals.io/message/28009#28009

Hi,

there is a inconsistency in using utf-8.

If you use tiny_html 
(http://de2.php.net/manual/en/function.tidy-repair-string.php), you have 
to use "utf8" to encode your data in utf-8.

If you use `html_entity_decode()` 
(http://de2.php.net/manual/en/function.html-entity-decode.php), you have 
to use "UTF-8".

This difference is not necessary. Can it be possible to use one 
notation. With current implementation, you always has to look into the 
documentation, which notation you have to use.

Mathias

---

## #28041 — Michael Wallner — 2007-02-15T19:12:47+00:00

URL: https://externals.io/message/28009#28041 · In reply to: #28009

Mathias Bank wrote:
> If you use tiny_html
> (http://de2.php.net/manual/en/function.tidy-repair-string.php), you have
> to use "utf8" to encode your data in utf-8.
> 
> If you use `html_entity_decode()`
> (http://de2.php.net/manual/en/function.html-entity-decode.php), you have
> to use "UTF-8".
> 
> This difference is not necessary. Can it be possible to use one
> notation. With current implementation, you always has to look into the
> documentation, which notation you have to use.

libtidy has a limited set of supported charsets, which is defined within
the library, so we can't do anything about that.
http://php.net/tidy_set_encoding

-- 
Michael
