How to remove diacritic of a string

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Vladish

    #1

    How to remove diacritic of a string

    ....in the easiest possible way. Do you have any idea? Any function or
    regexp?

    Thanx

    Spaiky


  • Andy Hassall

    #2
    Re: How to remove diacritic of a string

    On Thu, 22 Jan 2004 23:47:58 +0100, "Vladish" <V.Malanik@sh.c vut.cz> wrote:
    [color=blue]
    >...in the easiest possible way. Do you have any idea? Any function or
    >regexp?[/color]

    Depends what character set the string is encoded in.

    --
    Andy Hassall <andy@andyh.co. uk> / Space: disk usage analysis tool
    <http://www.andyh.co.uk > / <http://www.andyhsoftwa re.co.uk/space>

    Comment

    • Pedro Graca

      #3
      Re: How to remove diacritic of a string

      [ Please, but your question in the body of the post ]

      Vladish wrote:
      Subject: Re: How to remove diacritic of a string[color=blue]
      > ...in the easiest possible way. Do you have any idea? Any function or
      > regexp?[/color]

      Do you want "João Graça" -- my brother's name :) --
      transformed into "Joao Graca"?

      hmmmm ...

      strtr()
      <?php
      $in = 'João Graça';
      $with = 'áàãéèêíìîóç'; ## . other characters,
      $wout = 'aaaeeeiiioc'; ## . uppercase, etc.
      $out = strtr($in, $with, $wout);
      ?>

      but you'll have all sorts of problems with different charsets.
      --
      --= my mail box only accepts =--
      --= Content-Type: text/plain =--
      --= Size below 10001 bytes =--

      Comment

      Working...