# Tidy and Unicode changes

- Thread: https://externals.io/message/23012
- Original archive: https://news-web.php.net/php.internals/23012
- Started by Frank M. Kromann on 2006-04-28T19:14:50+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

---

## #23012 — Frank M. Kromann — 2006-04-28T19:14:50+00:00

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

Hello,

Not sure if you added a call to zend_set_converter_encoding() in the
current version of tidy.c, but this function is declared as an internal
function and this call prevents the tidy extension from building as
shared.

Can we find another way of doing this or get the core guys to add ZEND_API
macros to the function?

- Frank

---

## #23014 — Nuno Lopes — 2006-04-28T20:50:53+00:00

URL: https://externals.io/message/23012#23014 · In reply to: #23012

Well, I just need some way to convert a unicode string to ASCII. Probably 
there should exist a specific function (or a global converter) to accomplish 
this. Anyway that function should be exported.

Nuno

----- Original Message ----- 
> Hello,
>
> Not sure if you added a call to zend_set_converter_encoding() in the
> current version of tidy.c, but this function is declared as an internal
> function and this call prevents the tidy extension from building as
> shared.
>
> Can we find another way of doing this or get the core guys to add ZEND_API
> macros to the function?
>
> - Frank

---

## #23163 — Andrei Zmievski — 2006-05-05T21:09:30+00:00

URL: https://externals.io/message/23012#23163 · In reply to: #23014

Nuno,

There is zend_unicode_to_ascii() now. Check zend_unicode.c. It will 
return `NULL` if string cannot be converted to ASCII.

-Andrei



> Well, I just need some way to convert a unicode string to ASCII. 
> Probably there should exist a specific function (or a global 
> converter) to accomplish this. Anyway that function should be 
> exported.
>
> Nuno
>
> ----- Original Message -----
> > […]

---

## #23166 — Nuno Lopes — 2006-05-06T10:51:29+00:00

URL: https://externals.io/message/23012#23166 · In reply to: #23163

Thanks Andrei.
I've already changed the code to use it. The windows builds should now be 
fixed.

Nuno

----- Original Message ----- ,
>
> There is zend_unicode_to_ascii() now. Check zend_unicode.c. It will return 
> `NULL` if string cannot be converted to ASCII.
>
> -Andrei
>
> 
>
> > […]
