Special Charter Issue

Discussion in 'Mac Programming' started by amit-battan, Feb 3, 2010.

  1. amit-battan macrumors newbie

    Joined:
    Sep 10, 2009
    #1
    Hi All

    'Calle Mare de Déu de' this comes from database , and I am using xml parser to covert it into Array but when control comes to respective node then exception occur NSPlaceholderString initwithstring:] nil argument on snow leapord and on leapord exception occur but alert does not come.

    when I replace 'Calle Mare de Déu de' with 'Calle Mare de Deu de' then it works ok.

    Is It only due to 'é', means I want to know if NSString does not supported 'é' or any other characters

    Thanks
    Amit Battan
     
  2. skunkworker macrumors regular

    Joined:
    Sep 9, 2007
    #2
    What encoding are you using? Try using something like NSUTF16StringEncoding. If it is UTF8 then the maximum possible amount of unique characters is 2^8 = 256. So with UTF16 then 65,536 characters are allowed and probably the "é" as well.
     
  3. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #3
    This statement is wrong. UTF8 supports all Unicode characters and code-points. It does so using variable-length sequences with a specific format.
    http://en.wikipedia.org/wiki/UTF-8


    Nevertheless, the overall comment may be valid: the problem may be the encoding.
     
  4. skunkworker macrumors regular

    Joined:
    Sep 9, 2007
    #4
    Yeah I was wrong about using UTF-8, which is variable from 1 to 4 octets (usually 8 bits).
     

Share This Page