Comparing a Name

[quote=429687:@Brian O’Brien]Yes they compare fine… but i though it wasn’t a sure thing.
I am learning that some encodings are partially compatible with each other.
Anything 7 bit in ascii will compare with UTF8 but not above 128.

I’m still trying to figure out if there is a way to promote all strings to UTF-16 or ISO Latin and then compare in that encoding…[/quote]

Well that may be a solution, tue best will be to make sure the encodings you receive and declare are all UTF-8 then you simply don’t have these issues.

ConvertEncoding is what we use for ASCII encoded strings to UTF-8 so the dictionary keys are all equal encoding. As we sometimes had inconsistencies with key’s not being equal.

There is a method on this forum somehwere that converts a string encoding to UTF-8 the easy way.

[quote=429687:@Brian O’Brien]Yes they compare fine… but i though it wasn’t a sure thing.
I am learning that some encodings are partially compatible with each other.
Anything 7 bit in ascii will compare with UTF8 but not above 128.
[/quote]
right because in ASCII there ISNT anything above 127
its only defined for 0 - 127 and anything else is NOT ascii

42 . The answer to everything.

A rose by any other name, well is still a rose :slight_smile:

Naw … 42 IS ASCII :stuck_out_tongue:

It seems to me you should

  1. Convert to something that can represent everything (like UTF=8)
  2. do NOT change case but DO normalize the strings (you’ll need declares or plugins here)
  3. then see if they are =
  4. if so then see if strcmp with binary returns a value of 0 meaning they are also the same bytes) if not then they are different cases (since Xojo’s comparison ignores case to say =)