Skip to content

fix: chinese characters cannot be searched#36818

Open
QQ5YU wants to merge 3 commits into
RocketChat:developfrom
QQ5YU:fix/chinese-characters-cannot-be-searched
Open

fix: chinese characters cannot be searched#36818
QQ5YU wants to merge 3 commits into
RocketChat:developfrom
QQ5YU:fix/chinese-characters-cannot-be-searched

Conversation

@QQ5YU
Copy link
Copy Markdown

@QQ5YU QQ5YU commented Aug 28, 2025

Proposed changes (including videos or screenshots)

Before

image

After

image

Issue(s)

#713

Steps to test or reproduce

  1. Log in and send a direct message to a user with the sentence “我的爸爸肚子很餓” (My father is very hungry).
  2. Type the keyword “爸爸” (father) in the search bar to search for messages.
  3. Confirm that the search returns the sent message because it contains the keyword “爸爸.”

Further comments

In this modification, I added a check function to the messageSearch method
This function determines whether to use forceRegex.
If the input contains CJK characters, forceRegex is used; otherwise, the behavior depends on the settings.get('Message_AlwaysSearchRegExp') configuration.

@QQ5YU QQ5YU requested a review from a team as a code owner August 28, 2025 03:50
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Aug 28, 2025

🦋 Changeset detected

Latest commit: 0658a45

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 39 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot Bot commented Aug 28, 2025

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@zscontributor
Copy link
Copy Markdown

@QQ5YU you can follow this PR
#36162

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants