Replacing ō by o

Discussion in 'PHP' started by clades, Dec 30, 2008.

  1. #1
    How do i replace "ō" by "o" using a php script if "ō" can only be written in rich text documents (rtf,doc)
    Its not suported by urlencode that will replace it with a strange #333 that becomes %23333 in the url address.
     
    clades, Dec 30, 2008 IP
  2. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #2
    <?php
    
    $text = 'ō';
    
    echo iconv('', 'ASCII//TRANSLIT', $text);
    
    /** Returns:
     * 
     * o
     * 
     */
    PHP:
    As before, you may need to remove some minor extras, but seeing as you know about the other thread anyway this might not the be the solution you're looking for.

    More details perhaps?
     
    Danltn, Dec 30, 2008 IP