Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Create a channel and username with non-english characters

Open tuxxon opened this issue 6 years ago • 6 comments

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 avatar Apr 09 '19 00:04 tuxxon

@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

tuxxon avatar Apr 11 '19 00:04 tuxxon

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

for7raid avatar May 15 '19 18:05 for7raid

This happens with gujarati. I tried doing the following:

  • Layout -> User Interface -> "Allow Special Characters in Room Names"
  • General -> UTF8 -> set regex to .*
  • General -> UTF8 -> Enable "UTF8 Names Slugify"

Upon creating new room with only gujarati characters

  • Room's name shows up empty (in info)
  • RocketChat PlayStore app shows the room fine, but info still shows empty name
  • WebUI throws 404 for the newly created room

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

codingquark avatar May 27 '20 07:05 codingquark

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 avatar May 27 '20 07:05 codingquark

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:

  • Latin: e.g. English, français, Deutsch, español, português
  • Cyrillic: e.g. Русский язык, български език, українська мова
  • Chinese: e.g. 官话, 吴语 (converts to Latin script using Pinyin with optional tone number)
  • Japanese: e.g. ひらがな, カタカナ (converts to Romaji using Hepburn)

This seems to be causing the empty name issue!

codingquark avatar May 27 '20 08:05 codingquark

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

olodar avatar Jun 20 '24 08:06 olodar