Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global search does not find emoji in messages #2488

Open
Raiden-GH opened this issue Jan 8, 2025 · 4 comments
Open

global search does not find emoji in messages #2488

Raiden-GH opened this issue Jan 8, 2025 · 4 comments
Labels

Comments

@Raiden-GH
Copy link

The global search in DC-iOS only recognizes emojis in the name of the chats but not in the chats themselves. Since this is not the case in DC-Android and DC-Desktop, it is probably not a core bug.

iOS 18.2
DC-iOS 1.50.3

@Raiden-GH Raiden-GH added the bug label Jan 8, 2025
@r10s r10s changed the title Global search in DC-iOS does not recognize emojis in chats global search does not find emoji in messages Jan 11, 2025
@r10s
Copy link
Member

r10s commented Jan 11, 2025

i could reproduce that, i created a chat, a contact and a message each containing the emoji 😇:


doing a global search for 😇 finds it in chat name and contact name - but not in the message. moreover, the highlighting breaks the display:

doing a in-chat-search for the message, however is fine - the message is found (2 hits here) and also the highlighting is fine (see the background color around 😇 in the last message):

@Amzd
Copy link
Collaborator

Amzd commented Jan 12, 2025

This has to do with how the string is encoded. I tried a couple options in .cString(using:)

  • .iso2022JP works but idk the side effects
  • .symbol works for an emoji but not for text

Jsonrpc call works so maybe easiest to just convert to that. Have to figure out if we still need DcChatlist.

@r10s
Copy link
Member

r10s commented Jan 12, 2025

hm, but strings are all returned from core the same way. also, strings are given to core the same way. so, why is the hiliting in the in-chat-search working? (the hilighting is done in UI, not in core, afaik)

jsonrpc for basic low-level objects as needed by Andoid/iOS is missing and/or badly documented and is out of scope until we have fitting APIs. the current ones are optimised for Desktop and have eg. lots of for Android/iOS probably unneeded database calls, so would slow down things. things are improving there, however, nothing for now

@Amzd
Copy link
Collaborator

Amzd commented Jan 13, 2025

I don't know how core works nor can I fully comprehend rust but it says lossy conversion to string here: https://github.com/deltachat/deltachat-core-rust/blob/4ec50d19907f9b64bf144d37a004dcc62fc3ed07/deltachat-ffi/src/lib.rs#L915

And when I do "❤️".cString(using: .lossy) in Swift I get nil, so maybe it's something to do with that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants