• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use of Emojis
#1
Mike,

My "Collection" group is comprised exclusively of emojiis and they are displayed along with the song name in the title.

This enhances the "readability" I think, especially in the Songs Tab and Setlists.
E.g. a "heart" for a favorite song, and/or a "mic" when this song is suited for a a specific gear (TC-Helicon, PlayAcoustic"), a.s.o.
Also the "Santa Claus" emoji for a Christmas song.


Now, I wanted to have all Christmas songs be displayed at the bottom of the Songs Tab, as one flock so to speak.
In Windows this worked very well, the "Santa Claus" emoji precedes the song name (as part of the song Title).
However, in Android (with exact same settings as the Windows library) the songs with the preceding emoji are show at the top of the library, after Lennon's #9 Dream, and before, say, 50 Ways To Leave Your Lover...
Would it be possible to display the emoji-preceded songs at the bottom (past Z) in Android too?

Thanks
Ben
Reply
#2
I will have to look at the sorting logic to see how emojis are handled on each OS. I use the same basic sorting code, but there may be differences in how strings are compared that contain those emojis. It might help if you can send me some of those songs through a .msf file so I can easily import them without having to create them myself. If not, no worries, I will try to reproduce what you've described.

Mike
Reply
#3
Mike,

I just sent you a bunch of songs with emojis in the song titles. 

Thanks!
Ben
Reply
#4
Hello Mike,
When you handle this request, please take a thorough look at special characters in song names and filenames in general.

1.) Files with special characters in filenames are sorted differently on Android and Windows (by the OS). We have to accept this.
MSP Win10 and MSP Android sort special characters in song names differently. This should not be the case.

To investigate that I created a number of files and imported them with "Use Filename As Title".
Find attached a .ZIP file with 24 test files and a screenshot of my import settings.

2.) "Import - Local File" behaves differently:
On Android 23 of 24 files are imported, .SortTest.txt is missing.
On Win10 "Use Filename As Title" doesn't work correctly: Blank, % and _ are removed so files are considered to be duplicates which is not the case. 22 of 24 files are imported.

3.) The message after Import is not correct under Win10: if duplicate files are ignored, it says "Successfully imported xx of yy files". This is not true. yy is the number of files that I selected. This is correct. xx is also the number of selected files. This is not correct. It should be the number of files that in fact have been imported

4.) I'd like to have separate tabs in the alfabetic bar at the right for numbers and other special characters.
You could e.g. add one more tab for all special characters that are not numbers, keep '#' for numbers and name the new tab something like '@' or '§' (it shouldn't be more than one character).
Or maybe even handle numbers and special characters similar to letters and create a new tab for every occurring character.


Attached Files Thumbnail(s)
       

.zip   SortTest.zip (Size: 2.9 KB / Downloads: 2)
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#5
I'll look into #1-3, thanks for providing the zip file. As far as #4 goes, I'll have to consider whether this can easily be done. It's somewhat problematic to split up the "#" section and add separate entries in the alphabet list. If you look at how song titles are grouped on the songs tab, for example, each letter in the alphabet list corresponds to a song grouping with songs starting with that letter. If I wanted to have different alphabetic letters for every number or symbol, I would also need a separate song grouping category for every number or symbol, and I'm really not sure most people would like that (especially one section per number).  If I just want to have one more separate section for symbols, I might be able to accomplish that by sorting the list the way I currently do, and then extracting all songs starting with a non-numeric character from the # section and putting them into a new @ section. I should probably mention the fact that if I do this, some people put spaces at the beginning of songs to force them to the top of the list, but adding a symbol section would mean that the songs starting with a space would be put in that section instead. I think I like having just one section for symbols, because if I had separate sections per symbol, then a space symbol would make it seem like there is an empty character in the alphabet list. So if I do implement changes for this, it could have a big impact on some users that rely on upon the current sorting rules. I might have to make this new behavior optional (i.e. a new setting that says "Separate numbers and symbols") so that I don't negatively impact those users.

Mike
Reply
#6
What are your storage settings? I just imported all 24 files at once on Windows 10 and there was one duplicate, but Blank, % and _ were not removed when I used "Use Filename as Title". I don't know why we are seeing a difference in behavior there. I did find a bug with Microsoft's StorageFile API - if a file starts with a space, their file.Name method strips that space for some reason. So I had to write my own method to obtain the filename that preserves that space. I did adjust #3... it's just a matter of how you interpret it. I didn't want people thinking ignoring a file was considered a failure during import. My intent was more like, "24 of 24 files processed". I agree that stating the exact number of files that were imported (meaning a song was created or updated from them) is probably best. 

On Android, files beginning with a "." are ignored during import, and you shouldn't even see them in the list when doing Import->Local File (I didn't see it show up). This is by design - some users in the past encountered major problems because copies of their files beginning with a dot were present in their directories but were hidden in the file browser. The batch import would pick them up however, and cause their songs to use 0 kb versions of their files causing great confusion. Windows handles this a little differently, so I'm currently allowing those files to be imported on Windows.

Thanks,
Mike
Reply
#7
Hello Mike,
I tested once again and %SortTest.txt and _SortTest.txt were not imported, as shown in Ignoring_2_files.png.
I did not use Batch Import but Import - Local Files and selected all the files in the file browser.
Mobile Sheets Storage Location is set to d:\HerbertsGoogleDrive\_MobileSheets\
I import the files from d:\HerbertsGoogleDrive\_MobileSheets\Fkbk0\MSPTest\SortTest\

d:\HerbertsGoogleDrive\ is the local folder that I use for GoogleDrive, so it is an import from a local folder, not from GoogleDrive. GoogleDrive is only involved to synchronize between my devices

My Storage Settings are:
Delete Original After Copy: Off
Create Subdirectories For Songs: Off
Add Unique Id to Filenames: Off
Enable Dropbox Integration: Off
Enable Google Drive Integration: Off
No Dropbox Account and no Google Drive Account is associated with MSP
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#8
So I've explored the emoji issue some more, and if I add a new option to ignore localization sorting rules, you can have the emojis at the end of the list in Android. At the moment, in both Windows 10 and Android, I rely on a Collator object which takes into consideration sorting rules for the current language/locale. This is important as some characters are sorted differently depending upon the language (especially special characters). However, that same Collator that I depend upon changes the sorting of things like the emojis, so you will have to choose which is important to you.

As far as the sorting of special characters in the examples provided, that is a can of worms. I just spent over an hour and a half looking into it and there isn't an easy answer. Like I described above, the collators on each system are returning different sorting results. Furthermore, even if I ignore the collator and just do a straight string based comparison, I'm getting different sorting results in each version. For example, if I do a simple test of comparing "=SortTest" to "0SortTest" using C# for the Windows 10 version, it returns -1 meaning that "=SortTest" should go before "0SortTest". Yet if you simplify that down into the character codes, '=' has a value of 61 while '0' has a value of 48, meaning 0 should come first . So the C# code is doing some stuff with localization, unless I explicitly tell it to do a ordinal comparison which then states that "=SortTest" should go after "0SortTest".  So if I modify the code to do a straight ordinal comparison (which you aren't normally supposed to do for user facing things like sorting lists), I STILL get a different result than what Java returns when comparing strings using the standard compareTo method. Java does not have an equivalent of the ordinal comparison, so I had to write my own, and when I do that, I can get almost identical sorting results to what C# has. The next problem is that the standard sorting method in C# is a non-stable sort, meaning you can get different results every time you sort. If I add a slower stable sort, then I can finally match the results on Android. 

So while I can manage to get sorting with symbols to work out the same on each OS, I can't then use collators or localization rules. I don't think most users are going to want that, but in order to support the emojis as described above, I'll have to add a setting to ignore the collator anyway. You can decide if that's worthwhile for you to use.

Mike
Reply
#9
Batch Import shows the same behaviour: %SortTest.txt and _SortTest.txt are not imported.

Some special characters are ignored during sorting, some are considered. It is different on Win10 and Android which characters are ignored and which are considered.
The setting "Normalize Characters" ON or OFF affects not only diacritical marks but also which special characters are ignored and which are considered for sorting.

It's not the most important feature anyway. I just made some experiments with prefixes that move some songs out of the regular sort order, like those "some people put spaces at the beginning of songs to force them to the top of the list" that you mentioned before. And I'd like these prefixed songs to show up in the same sort order on Win10 and on Android.
With all the investigation that I did by now, I'm sure I'll find a workaround to achieve what I want.

Isn't a collator or a sort algorithm available that could be used for both Win10 and Android?


Attached Files Thumbnail(s)
           
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#10
Android uses the ICU library for collation (as far as I can tell). I have no idea what Microsoft uses. I'm trying to see if I can compile ICU for C#/Windows 10, but it's been a painful process so far. If I can get it working, then sorting would be the same between the two. If not, then the current sorting rules are just something that users are going to have to live with. Turning off the localization sorting rules would make things pretty close between Windows 10 and Android though for users that don't care about that.

Mike
Reply
#11
I have achieved success at integrating the ICU library on Window 10. I now get identical sorting results when using the collator. This does mean that the emojis show up at the top of the list now in Windows 10 too, but with the new option I'm adding to ignore localization rules, you'll be able to have them at the end as you like.

Mike
Reply
#12
That's great, thank you Mike!
(In my case I will indeed move them to the end)
Ben
Reply
#13
Mike,

thank you for the new release. The greying of empty groups works well in Windows now.
As to sorting of icons, I haven't found a way to move them back past "Z" (where they were before), they appear, as mentioned by you already, in the # section at the top of the library.
Is the "new option I'm adding to ignore localization rules" available already?

Thanks
Ben
Reply
#14
Yes, you can find that under the Library Settings. The setting is called "Use Language Sorting Rules".

Mike
Reply
#15
Thank you Mike, when that setting is switched off the emojis are at the bottom of the library, just as hoped for!
(A few songs with first a character like the French "ç" are now below the Z, but that's alright).
Ben
Reply




Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.