# suggested patch for ext/standard/html.c for correct htmlentity'ing of cyrillic characters

- Thread: https://externals.io/message/128
- Original archive: https://news-web.php.net/php.internals/128
- Started by Antony Dovgal on 2003-03-21T10:41:05+00:00
- Messages: 4
- 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

---

## #128 — Antony Dovgal — 2003-03-21T10:41:05+00:00

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

Hello, all.

 Attached patch provides cyrillic character sets support to
 `htmlentities()`, useful for those who wants to see correct cyrillic
letters after using this function (at this moment `htmlentities()`
successfully breaks cyrillic characters). 
 KOI8-R, Windows-1251 & CP866 encodings are supported.

 I've tested this patch with PHP-CVS & PHP 4.3.2RC1 - it seems to be
working correctly.
 Someone who has enough karma - please, take a look at it and apply it
if it's ok.


--
Wbr,
Antony Dovgal aka tony2001	mailto:tony2001@phpclub.net
http://phpclub.net
---
Stand for something or you will fall for nothing.

---

## #129 — Wez Furlong — 2003-03-21T10:51:47+00:00

URL: https://externals.io/message/128#129 · In reply to: #128

+1 from me (I will apply it to PHP5).

This looks like a suitable candidate for 4.3.2 also; no new code is
introduced by this patch, merely a lookup table, and adding more
encodings can be regarded as a fix.

Opinions?

--Wez.



> Hello, all.
>
>  Attached patch provides cyrillic character sets support to
> `htmlentities()`, useful for those who wants to see correct cyrillic
> letters after using this function (at this moment `htmlentities()`
> successfully breaks cyrillic characters).
>  KOI8-R, Windows-1251 & CP866 encodings are supported.
>
>  I've tested this patch with PHP-CVS & PHP 4.3.2RC1 - it seems to be
> working correctly.
>  Someone who has enough karma - please, take a look at it and apply it
> if it's ok.
>
>
> --
> Wbr,
> Antony Dovgal aka tony2001	mailto:tony2001@phpclub.net
> http://phpclub.net
> ---
> Stand for something or you will fall for nothing.

---

## #141 — Jani Taskinen — 2003-03-22T10:59:10+00:00

URL: https://externals.io/message/128#141 · In reply to: #129

Go ahead and commit it then..and MFH..
    
    --Jani
    



>+1 from me (I will apply it to PHP5).
>
>This looks like a suitable candidate for 4.3.2 also; no new code is
>introduced by this patch, merely a lookup table, and adding more
>encodings can be regarded as a fix.
>
>Opinions?
>
>--Wez.
>
>
>
> > […]
>
>

-- 
<- For Sale!

---

## #230 — Moriyoshi Koizumi — 2003-03-24T19:53:13+00:00

URL: https://externals.io/message/128#230 · In reply to: #128

Your patch has been committed with a slight enhancement to the cp1251 
table. Thanks.

Moriyoshi

Antony Dovgal <tony2001@phpclub.net> wrote:

> Hello, all.
> 
>  Attached patch provides cyrillic character sets support to
> `htmlentities()`, useful for those who wants to see correct cyrillic
> letters after using this function (at this moment `htmlentities()`
> successfully breaks cyrillic characters). 
>  KOI8-R, Windows-1251 & CP866 encodings are supported.
> 
>  I've tested this patch with PHP-CVS & PHP 4.3.2RC1 - it seems to be
> working correctly.
>  Someone who has enough karma - please, take a look at it and apply it
> if it's ok.
