Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #25105

Re: Cannot manipulate array produced with string.match

From SteveYoungTbird <stephen.young@chello.at>
Newsgroups comp.lang.javascript
Subject Re: Cannot manipulate array produced with string.match
Date 2014-06-27 22:18 +0200
Organization A noiseless patient Spider
Message-ID <lokjjc$o0v$1@dont-email.me> (permalink)
References <loj5qn$cof$1@dont-email.me> <lojfg6$i56$2@dont-email.me> <lokbfi$vac$1@dont-email.me> <lokfoe$q6k$1@dont-email.me>

Show all headers | View raw


On 06/27/2014 09:13 PM, Denis McMahon wrote:
> On Fri, 27 Jun 2014 20:00:18 +0200, SteveYoungTbird wrote:
> 
>> I did as you  suggested and strangely the alert reads " 'jim' !== 'jim'
>> " as well as all of the other names not being equal to 'jim'
> 
> Hmm, now you need to figure out what the differences are.
> 
> I noticed that your original post had characters outside of the basic 7 
> bit ascii character set. Is it possible that you are comparing characters 
> in different encodings?
> 
> For example if 'jim' contains any of these characters, and 'jim' in your 
> program code is in utf-8, but 'jim' in your string is in some other 
> character set, then the representations of the non ascii characters might 
> be different even though they look the same.
> 

Ah, that sounds like a likely reason. The text that I am using .match on
is read from a German RSS feed.

Is there any way of converting it to utf-8 in javaScript if it is not
already so encoded?

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Cannot manipulate array produced with string.match SteveYoungTbird <stephen.young@chello.at> - 2014-06-27 09:17 +0200
  Re: Cannot manipulate array produced with string.match Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-27 10:02 +0000
    Re: Cannot manipulate array produced with string.match SteveYoungTbird <stephen.young@chello.at> - 2014-06-27 20:00 +0200
      Re: Cannot manipulate array produced with string.match Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-27 19:13 +0000
        Re: Cannot manipulate array produced with string.match SteveYoungTbird <stephen.young@chello.at> - 2014-06-27 22:18 +0200
          Re: Cannot manipulate array produced with string.match SteveYoungTbird <stephen.young@chello.at> - 2014-06-27 23:24 +0200
            Re: Cannot manipulate array produced with string.match Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-28 01:07 +0000
              Re: Cannot manipulate array produced with string.match Denis McMahon <denismfmcmahon@gmail.com> - 2014-06-28 01:16 +0000
            Re: Cannot manipulate array produced with string.match Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-28 23:53 +0200
              Re: Cannot manipulate array produced with string.match SteveYoungTbird <stephen.young@chello.at> - 2014-06-29 22:24 +0200
                Re: Cannot manipulate array produced with string.match Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-29 23:19 +0200
  Re: Cannot manipulate array produced with string.match JJ <jj4public@vfemail.net> - 2014-06-27 19:31 +0700

csiph-web