How to ignore (or convert) non UTF8 characters?

Discussion in 'Javascript' started by Tux SC, Feb 27, 2007.

  1. Tux SC

    Tux SC Guest

    Hello,

    I have a JavaScript function which receives as input a string which in
    some cases contain non-UTF8 characters. The output of this function is
    used by another utility which fails if it receives any non-UTF8
    characters. Is there a way for me to filter out or convert the non-
    UTF8 characters in the JavaScript function?

    Thanks much!
     
    Tux SC, Feb 27, 2007
    #1
    1. Advertising

  2. Tux SC

    Guest

    > Is there a way for me to filter out or convert the non-
    > UTF8 characters in the JavaScript function?


    Try using the global function escape(). :)
     
    , Feb 27, 2007
    #2
    1. Advertising

  3. Tux SC

    ASM Guest

    David Golightly a écrit :
    > On Feb 27, 1:55 pm, wrote:
    >>> Is there a way for me to filter out or convert the non-
    >>> UTF8 characters in the JavaScript function?

    >> Try using the global function escape(). :)

    >
    > Deprecated - instead use encodeURIComponent.


    What is really different between both ?



    --
    Stephane Moriaux et son (moins) vieux Mac déjà dépassé
    Stephane Moriaux and his (less) old Mac already out of date
     
    ASM, Feb 28, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    366
    Keith Thompson
    Mar 17, 2006
  2. Replies:
    0
    Views:
    318
  3. Replies:
    8
    Views:
    756
    Eric Sosman
    Mar 17, 2006
  4. gry
    Replies:
    2
    Views:
    767
    Alf P. Steinbach
    Mar 13, 2012
  5. Jochen Lehmeier

    DBD::Oracle, Unicode, non-UTF8-non-ASCII strings

    Jochen Lehmeier, Jul 23, 2009, in forum: Perl Misc
    Replies:
    0
    Views:
    425
    Jochen Lehmeier
    Jul 23, 2009
Loading...

Share This Page