Xojo Banning and Deleting Posts

Still there. It’s amazing how easy it is to ignore things on the interwebs.

It is not a bug, it is a feature because Xojo says so. Now shut up or I will be deleting posts and banning users! :roll_eyes:

Its not a bug. The string functions have always worked on code points and not grapheme clusters. Rick was becoming a pain in the arse by just repeating that it was a bug.

From my point of view it is a Bug, sorry. And I am happy that people like Rick showing that opposition is sometimes needed. Even then when many people are not getting that it is right. Otherwise there would never be a change in something.

Right
Use TEXT
It works in grapheme clusters already

And there is no reason Xojo “needs” to get rid of it
Its already implemented using ICU

Its not a bug. I’m pretty sure your favourite language Java would provide the same result.

Having Text & String is confusing. The relevant functions should be added into String.

1 Like

Ihm pretty sure not.

So one is not needed in your programmers world?

I don’t understand.

If this was the Xojo forums, Kem would tell you to stop arguing.

A quick test indicates that Java thinks the length of both strings is 2. This is different to what Xojo String reports but isn’t what Gary was expecting.

Neither Java or Xojo are wrong though. They just don’t support grapheme clusters so report the length based on their understanding of strings.

public class grapheme 
{
  public static void main(String[] args)
  {
  	String a = "☺️";
  	int aLength = a.length();
  	
	String b = "😀";
	int bLength = b.length();
  	
  	System.out.println(aLength);
  	System.out.println(bLength);
  }
}

Rik just couldn’t seem to get it through his head that there wasn’t a bug. He was starting to get very annoying.

The Xojo docs are misleading as the functions don’t really deal with characters as people see them today.

Xojo TEXT does ! :stuck_out_tongue:

I wonder what that like? :thinking:

Yes, the text data type does that but its deprecated.

Dart have something like Xojo Text.

No we come to the point

My understanding is that runes don’t solve the problem and they had to add a package for graphemes clusters.

This basic example using the character from Gary’s post returns 2 which is the same as Xojo.

void main() {
  String str = "☺️";
  
  int count = 0;
  str.runes.forEach((int rune) { 
    var chr=new String.fromCharCode(rune); 
    print(chr); 
    count++;
  }); 
  
  print(count);
}

I explained about it in TOF.