# Interesting Issue with strtoupper()

- Thread: https://externals.io/message/754
- Original archive: https://news-web.php.net/php.internals/754
- Started by Timothy Hitchens \HiTCHO\ on 2003-04-07T12:25:15+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

---

## #754 — Timothy Hitchens \HiTCHO\ — 2003-04-07T12:25:15+00:00

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

The following is an error that one of the guys at my office found today.

This is the code snippet that generated the problem... 

        echo ("btnText:$btnText<BR>"); 
        $text = strtoupper(xlat($btnText)); 
        echo ("text:$text<BR>"); 

... where the value of xlat($btnText) is "Nästa". 

It appears that `strtoupper()` will sometimes produce "NäSTA" and
sometimes the "a" will be correctly uppercased. 



Timothy Hitchens (HiTCHO)
Web Application Consulting
e-mail: tim@hitcho.com.au
mobile: 0419 521 440



-------------------------------------------------
HiTCHO Group - ABN: 85 816 540 110
web site: http://www.hitcho.com.au/
snail mail: PO Box 101 Arana Hills QLD 4054
telephone: 07 3351 0951 - facsimile: 07 3351 0952

---

## #768 — Moriyoshi Koizumi — 2003-04-07T20:03:09+00:00

URL: https://externals.io/message/754#768 · In reply to: #754

Which version of PHP? And what are the locale settings (envs) like?
AFAIK a similar case was reported and fixed already.

Moriyoshi

"Timothy Hitchens \(HiTCHO\)" <hitcho@php.net> wrote:

> The following is an error that one of the guys at my office found today.
> 
> This is the code snippet that generated the problem... 
> 
>         echo ("btnText:$btnText<BR>"); 
>         $text = strtoupper(xlat($btnText)); 
>         echo ("text:$text<BR>"); 
> 
> ... where the value of xlat($btnText) is "N舖ta". 
> 
> It appears that `strtoupper()` will sometimes produce "N膣TA" and
> sometimes the "a" will be correctly uppercased.
