title: iOS NSMutableAttributedString Crash With unrecognized selector
body: <p>Help! </p>
  
  <p>the crash happens at :</p>
  
  <pre><code>[emtionString replaceCharactersInRange:range withString:imageAndRangeDicArray[i][@"image"]];
  </code></pre>
  
  <p>When <code>NSMutableAttributedString</code> is replaced with attributeString   </p>
  
  <p>This is the stack trace:</p>
  
  <pre><code>Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSConcreteMutableAttributedString _encodingCantBeStoredInEightBitCFString]: unrecognized selector sent to instance 0x7fe8f34f52f0'
  
      *** First throw call stack:
      (
          0   CoreFoundation                      0x0000000107e95f35 __exceptionPreprocess + 165
          1   libobjc.A.dylib                     0x0000000107b2ebb7 objc_exception_throw + 45
          2   CoreFoundation                      0x0000000107e9d04d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
          3   CoreFoundation                      0x0000000107df527c ___forwarding___ + 988
          4   CoreFoundation                      0x0000000107df4e18 _CF_forwarding_prep_0 + 120
          5   CoreFoundation                      0x0000000107db8195 __CFStringCheckAndReplace + 597
          6   CoreFoundation                      0x0000000107db7f1b -[__NSCFString replaceCharactersInRange:withString:] + 27
          7   Foundation                          0x00000001076da63e -[NSConcreteMutableAttributedString replaceCharactersInRange:withString:] + 337          
  </code></pre>