RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.07k stars 10.34k forks source link

Create a channel and username with non-english characters #14055

Open tuxxon opened 5 years ago

tuxxon commented 5 years ago

RocketChat/Rocket.Chat.Electron#1176 RocketChat/Rocket.Chat.Android#2210

Description:

In korea, users want to create a channel and username in korean. so Can you provide the feature that uses UTF-8 characters? So, we can create a channel and username in non-english charaters.

Steps to reproduce:

  1. create a channel
  2. type a non-english characters in input box for the channel.

    doesn't work

Expected behavior:

To create a channel or username in UTF-8 characters.

Actual behavior:

Doesn't work. but created in english only.

tuxxon commented 5 years ago

@tassoevan With your comment, I have configured my rocket.chat on local, but It didn't work. That is, I couldn't create a channel name in korean. Test url = http://chat.stackcraft.co/ id = tuxxon, pass=123456

The following screen is showed when typing in UTF8 (korean, 테스트). image

for7raid commented 5 years ago

Hi FYI it is ok with russian characters in channel names Server 1.0.2, web an elecrton app

codingquark commented 4 years ago

This happens with gujarati. I tried doing the following:

Upon creating new room with only gujarati characters

I would love the make a PR here if I could find out where the problem lies. Any help will be appreciated!

codingquark commented 4 years ago

Here is what I've found:

createChannel.js calls createRoom which, on #53 calls getValidRoomName which is trying to "slugify" the name.

In the process, it seems non-ascii chars are removed from the room's name.

I tried adding some latin chars to the room which had only Gujarati characters before. This caused the room name to be displayed in full (gu + latin) on the web UI's sidebar, and info panel of the room shows name to be only latin chars.

codingquark commented 4 years ago

This might feel like I'm using the issue as a scratchpad, but I'm not I promise, sorry!

getValidRoomName.js#21 uses limax to generate slugifiedName if UI_Allow_room_names_with_special_chars is set to true (which it is in all these cases).

Limax docs say: Currently supports, but not limited to, the following scripts:

This seems to be causing the empty name issue!

olodar commented 3 months ago

Seriously? This problem exists for 5+ years? Still not possible to create channel with Japanese characters. image