Jump to content

[SOLVED] uppercase foreign letters


The Little Guy

Recommended Posts

I found this on that page, and it seems to work well

 

<?php

define("LATIN1_UC_CHARS", "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝ");
define("LATIN1_LC_CHARS", "àáâãäåæçèéêëìíîïðñòóôõöøùúûüý");

function uc_latin1 ($str) {
    $str = strtoupper(strtr($str, LATIN1_LC_CHARS, LATIN1_UC_CHARS));
    return strtr($str, array("ß" => "SS"));
}

?>

Am I missing something? Whats wrong with...

 

strtoupper("àáâãäåæçèéêëìíîïðñòóôõöøùúûüý");

 

Output:

ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝ

 

I don't know, but for me, that doesn't work...

Am I missing something? Whats wrong with...

 

strtoupper("àáâãäåæçèéêëìíîïðñòóôõöøùúûüý");

 

Output:

ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝ

 

I don't know, but for me, that doesn't work...

 

Are you running it in the command line?  It won't work there, although it will in the browser.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.