PHP: Turkish locale makes all your class names lowercase



  • @Onyx said:

    the output is correct.
     

    @Onyx said:

    <?

    $lower = 'č ć ž š đ dž lj nj';
    echo strtoupper($lower);
     ?>

    output: č ć ž š đ dž lj nj

     

    I don't dispute that this is what you see, but it's difficult for me to call it "correct".



  • @fatbull said:

    @Onyx said:

    php copes with them no problem:

    <?php
    
        setlocale(LC_ALL, 'hr_HR');
        
        $lower = 'č ć ž š đ dž lj nj';
        $upper = 'Č Ć Ž Š Đ Dž Lj Nj';
        
        echo strtoupper($lower);
        echo '<br>';
        echo strtolower($upper);
    
    ?>
    Output:
        č ć ž š đ dž lj nj
        Č Ć Ž Š Đ Dž Lj Nj
    

    Shouldn't the first line be upper case and the second line be lower case?

    Maybe Turkish is read from the bottom up



  • @Speakerphone Dude said:

    Maybe Turkish is read from the bottom up
    That's a vicious stereotype perpetuated by the movie "Midnight Run".  Turks are no more inclined to prefer "going in the back door" than any other nationality.


  • BINNED

    @PJH said:

    [pjh@sofa tmp]$ gcc fp.c -o fp -Wall 

    .. missed off the flag that warns on a missing void:

    [pjh@sofa tmp]$ gcc fp.c -o fp -Wall -Wstrict-prototypes
     Oh the fun of what the gcc people think "all" means

  • Discourse touched me in a no-no place

    @topspin said:

    @PJH said:
    [pjh@sofa tmp]$ gcc fp.c -o fp -Wall 

    .. missed off the flag that warns on a missing void:

    [pjh@sofa tmp]$ gcc fp.c -o fp -Wall -Wstrict-prototypes
     Oh the fun of what the gcc people think "all" means
    Well - quite. I forgot because most of the flags (of the strict-prototypes sort) I use with gcc are 'hidden' in makefiles; and I rarely invoke gcc directly from the command line.

Log in to reply