Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

String manipulation takes a dive when characters beyond \:FFFF are used e.g. Mathematical Alphanumeric Symbols. The characters display fine but doing string manipulation is very unpredictable:

ToCharacterCode["𝕬"] (* Actually is \U0001d56c *)
StringLength["𝕬"]
(* {55349, 56684} *)
(* 2 *)

Compare with python

>>> len(u'𝕬') 
1

$CharacterEncoding = "Unicode" or $CharacterEncoding = "UTF8" does not help, is there some way to set string encoding properly?

share|improve this question
2  
    
@WReach Thanks! Couldn't find them searching google and here. –  ssch Nov 23 '12 at 19:36
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.