Unicode

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

    Unicode

    is there any way to convert a unicode text to normal text in a text box
    before using it?

    I have an aplication (SMS Application) that submits all the 160
    character message to the database, then another script grabs it from
    the DB and sends it through the route.

    I'm having a problem with unicode characters, they cost double and i
    need a way to convert all unicode to normal text before sending it.

  • Julien CROUZET

    #2
    Re: Unicode

    Maximus a couché sur son écran :[color=blue]
    > is there any way to convert a unicode text to normal text in a text box
    > before using it?
    >
    > I have an aplication (SMS Application) that submits all the 160
    > character message to the database, then another script grabs it from
    > the DB and sends it through the route.
    >
    > I'm having a problem with unicode characters, they cost double and i
    > need a way to convert all unicode to normal text before sending it.[/color]

    Depends on what your call "normal" text.
    utf8_decode($st r) will decode an utf8 encoded string in a ISO-8859-1
    string.

    Regards,

    --
    Julien CROUZET - DSI Theoconcept
    julien.crouzet@/enlever ca\theoconcept. com



    Comment

    • Maximus

      #3
      Re: Unicode

      what if i wanted to convert from anything to ISO-8859-1

      let's say i want it converted from any type of text inserted by the user

      Comment

      • Julien CROUZET

        #4
        Re: Unicode

        Maximus a formulé ce vendredi :[color=blue]
        > what if i wanted to convert from anything to ISO-8859-1
        >
        > let's say i want it converted from any type of text inserted by
        > the user[/color]

        'Anything' is quite dangerous here, a character code is generally
        in more than one encoding, isn't there any way to store the encoding
        (ie: guessed from HTTP Headers) in your database ?

        Have a look at http://us2.php.net/manual/en/ref.recode.php to convert
        quite 'anything' to quite 'anything'.



        --
        Julien CROUZET - DSI Theoconcept
        julien.crouzet@/enlever ca\theoconcept. com



        Comment

        • Jasen Betts

          #5
          Re: Unicode

          On 2006-02-17, Maximus <teddy.am@gmail .com> wrote:
          [color=blue]
          > is there any way to convert a unicode text to normal text in a text box
          > before using it?[/color]

          converting in the text box without using the text box?

          what's a text box?
          [color=blue]
          > I have an aplication (SMS Application) that submits all the 160
          > character message to the database, then another script grabs it from
          > the DB and sends it through the route.[/color]

          sounds fairly straight forward.
          [color=blue]
          > I'm having a problem with unicode characters, they cost double and i
          > need a way to convert all unicode to normal text before sending it.[/color]

          what's the difference between normal text and unicode?

          Bye.
          Jasen

          Comment

          Working...