[GH-ISSUE #1618] Incorrect display Russian text in command output #2955

Open
opened 2026-03-14 06:04:34 +03:00 by kerem · 4 comments
Owner

Originally created by @crackco00n on GitHub (Aug 30, 2023).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/1618

Server Info (please complete the following information):

  • OS: Debian 11 (bullseye)
  • Browser: firefox, chrome, safari
  • RMM Version: v.0.16.2

Installation Method:

  • Standard
  • Docker

Agent Info (please complete the following information):

  • Agent version: v2.4.11
  • Agent OS: Windows 11 Pro, 64 bit v22H2

Describe the bug
When I send a command to WEBUI or execute a script, I get incorrect content display. (Usernames and group names)
A similar issue has been #1472
But I have everything else displayed correctly, except for the listed.

To Reproduce
Steps to reproduce the behavior:

  1. Client OS's language should be Russian
  2. in WebUI right click on a host => Send command Get-LocalGroup
  3. Run command that gives output in Russian (CMD or Powershell)
  4. I get incorrect content output.

Expected behavior
Correct display of command output in any language.

Screenshots
Снимок экрана 2023-08-30 в 16 38 42

Additional context
The standard output of scripts has the same incorrect display of the Russian language.

Originally created by @crackco00n on GitHub (Aug 30, 2023). Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/1618 **Server Info (please complete the following information):** - OS: Debian 11 (bullseye) - Browser: firefox, chrome, safari - RMM Version: v.0.16.2 **Installation Method:** - [x] Standard - [ ] Docker **Agent Info (please complete the following information):** - Agent version: v2.4.11 - Agent OS: Windows 11 Pro, 64 bit v22H2 **Describe the bug** When I send a command to WEBUI or execute a script, I get incorrect content display. (Usernames and group names) A similar issue has been #1472 But I have everything else displayed correctly, except for the listed. **To Reproduce** Steps to reproduce the behavior: 1. Client OS's language should be Russian 2. in WebUI right click on a host => Send command `Get-LocalGroup` 3. Run command that gives output in Russian (CMD or Powershell) 4. I get incorrect content output. **Expected behavior** Correct display of command output in any language. **Screenshots** <img width="1002" alt="Снимок экрана 2023-08-30 в 16 38 42" src="https://github.com/amidaware/tacticalrmm/assets/137088704/5d78d911-2df7-4df7-b053-640776da311f"> **Additional context** The standard output of scripts has the same incorrect display of the Russian language.
Author
Owner

@vsychov commented on GitHub (Dec 13, 2023):

The problem arises due to the Windows code page; the TacticalRMM agent removes all non-UTF-8 symbols (github.com/amidaware/rmmagent@f0736faf4b/agent/utils.go (L225)). To fix this issue, you can try the following PowerShell script and then restart your PC:

chcp 65001
$Utf8CodePage = "65001"
$RegPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Nls\CodePage"
Set-ItemProperty -Path $RegPath -Name "OEMCP" -Value $Utf8CodePage
Set-ItemProperty -Path $RegPath -Name "ACP" -Value $Utf8CodePage
<!-- gh-comment-id:1853514307 --> @vsychov commented on GitHub (Dec 13, 2023): The problem arises due to the Windows code page; the TacticalRMM agent removes all non-UTF-8 symbols (https://github.com/amidaware/rmmagent/blob/f0736faf4bcb20f3f83fb0e65dddbc3e595699ad/agent/utils.go#L225). To fix this issue, you can try the following PowerShell script and then restart your PC: ```ps1 chcp 65001 $Utf8CodePage = "65001" $RegPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Nls\CodePage" Set-ItemProperty -Path $RegPath -Name "OEMCP" -Value $Utf8CodePage Set-ItemProperty -Path $RegPath -Name "ACP" -Value $Utf8CodePage ```
Author
Owner

@P6g9YHK6 commented on GitHub (Oct 28, 2024):

chcp 65001
$Utf8CodePage = "65001"
$RegPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Nls\CodePage"
Set-ItemProperty -Path $RegPath -Name "OEMCP" -Value $Utf8CodePage
Set-ItemProperty -Path $RegPath -Name "ACP" -Value $Utf8CodePage

this worked

<!-- gh-comment-id:2441507335 --> @P6g9YHK6 commented on GitHub (Oct 28, 2024): > ```powershell > chcp 65001 > $Utf8CodePage = "65001" > $RegPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Nls\CodePage" > Set-ItemProperty -Path $RegPath -Name "OEMCP" -Value $Utf8CodePage > Set-ItemProperty -Path $RegPath -Name "ACP" -Value $Utf8CodePage > ``` this worked
Author
Owner

@P6g9YHK6 commented on GitHub (Nov 4, 2024):

chcp 65001
$Utf8CodePage = "65001"
$RegPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Nls\CodePage"
Set-ItemProperty -Path $RegPath -Name "OEMCP" -Value $Utf8CodePage
Set-ItemProperty -Path $RegPath -Name "ACP" -Value $Utf8CodePage

this worked

ok this was a bad idea it broke so many other things XD

<!-- gh-comment-id:2454589738 --> @P6g9YHK6 commented on GitHub (Nov 4, 2024): > > ```powershell > > chcp 65001 > > $Utf8CodePage = "65001" > > $RegPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Nls\CodePage" > > Set-ItemProperty -Path $RegPath -Name "OEMCP" -Value $Utf8CodePage > > Set-ItemProperty -Path $RegPath -Name "ACP" -Value $Utf8CodePage > > ``` > > this worked ok this was a bad idea it broke so many other things XD
Author
Owner

@P6g9YHK6 commented on GitHub (May 22, 2025):

working solution in
https://github.com/amidaware/community-scripts/pull/287

{{CallPowerShell7Lite}}
Write-Host "PowerShell Version: $($PSVersionTable.PSVersion)"
[Text.Encoding]::Default

$charList = @(
    @{ Char = [char]101;      Desc = "Basic Latin letter e" },
    @{ Char = [char]945;      Desc = "Greek small alpha" },
    @{ Char = [char]1080;     Desc = "Cyrillic small i (Russian)" },
    @{ Char = [char]1489;     Desc = "Hebrew letter Bet" },
    @{ Char = [char]1576;     Desc = "Arabic letter Beh" },
    @{ Char = [char]2309;     Desc = "Hindi Devanagari letter" },
    @{ Char = [char]2949;     Desc = "Tamil letter" },
    @{ Char = [char]3585;     Desc = "Thai letter" },
    @{ Char = [char]2437;     Desc = "Bengali letter" },
    @{ Char = [char]1329;     Desc = "Armenian letter" },
    @{ Char = [char]12354;    Desc = "Japanese Hiragana letter" },
    @{ Char = [char]12450;    Desc = "Japanese Katakana letter" },
    @{ Char = [char]44032;    Desc = "Korean Hangul syllable" },
    @{ Char = [char]169;      Desc = "Copyright Symbol" },
    @{ Char = [char]174;      Desc = "Registered Symbol" },
    @{ Char = [char]8364;     Desc = "Euro Currency Sign" },
    @{ Char = [char]163;      Desc = "Pound Currency Sign" },
    @{ Char = [char]165;      Desc = "Yen Currency Sign" },
    @{ Char = [char]9608;     Desc = "Full Block Box Drawing" },
    @{ Char = [char]9474;     Desc = "Vertical Bar Box Drawing" },
    @{ Char = [char]9500;     Desc = "Left Tee Box Drawing" },
    @{ Char = [char]8594;     Desc = "Right Arrow" },
    @{ Char = [char]8592;     Desc = "Left Arrow" },
    @{ Char = [char]8734;     Desc = "Infinity Symbol" },
    @{ Char = [char]8805;     Desc = "Greater Than or Equal" },
    @{ Char = [char]8804;     Desc = "Less Than or Equal" },
    @{ Char = [char]215;      Desc = "Multiplication Sign" },
    @{ Char = [char]247;      Desc = "Division Sign" }
)

foreach ($item in $charList) {
    Write-Host "$($item.Char) : $($item.Desc)"
}

Image

UTF8 on it's own is not enough
powershell 7 same
but both fixes the issue.

<!-- gh-comment-id:2900765332 --> @P6g9YHK6 commented on GitHub (May 22, 2025): working solution in https://github.com/amidaware/community-scripts/pull/287 ``` {{CallPowerShell7Lite}} Write-Host "PowerShell Version: $($PSVersionTable.PSVersion)" [Text.Encoding]::Default $charList = @( @{ Char = [char]101; Desc = "Basic Latin letter e" }, @{ Char = [char]945; Desc = "Greek small alpha" }, @{ Char = [char]1080; Desc = "Cyrillic small i (Russian)" }, @{ Char = [char]1489; Desc = "Hebrew letter Bet" }, @{ Char = [char]1576; Desc = "Arabic letter Beh" }, @{ Char = [char]2309; Desc = "Hindi Devanagari letter" }, @{ Char = [char]2949; Desc = "Tamil letter" }, @{ Char = [char]3585; Desc = "Thai letter" }, @{ Char = [char]2437; Desc = "Bengali letter" }, @{ Char = [char]1329; Desc = "Armenian letter" }, @{ Char = [char]12354; Desc = "Japanese Hiragana letter" }, @{ Char = [char]12450; Desc = "Japanese Katakana letter" }, @{ Char = [char]44032; Desc = "Korean Hangul syllable" }, @{ Char = [char]169; Desc = "Copyright Symbol" }, @{ Char = [char]174; Desc = "Registered Symbol" }, @{ Char = [char]8364; Desc = "Euro Currency Sign" }, @{ Char = [char]163; Desc = "Pound Currency Sign" }, @{ Char = [char]165; Desc = "Yen Currency Sign" }, @{ Char = [char]9608; Desc = "Full Block Box Drawing" }, @{ Char = [char]9474; Desc = "Vertical Bar Box Drawing" }, @{ Char = [char]9500; Desc = "Left Tee Box Drawing" }, @{ Char = [char]8594; Desc = "Right Arrow" }, @{ Char = [char]8592; Desc = "Left Arrow" }, @{ Char = [char]8734; Desc = "Infinity Symbol" }, @{ Char = [char]8805; Desc = "Greater Than or Equal" }, @{ Char = [char]8804; Desc = "Less Than or Equal" }, @{ Char = [char]215; Desc = "Multiplication Sign" }, @{ Char = [char]247; Desc = "Division Sign" } ) foreach ($item in $charList) { Write-Host "$($item.Char) : $($item.Desc)" } ``` ![Image](https://github.com/user-attachments/assets/290cc2de-fe95-4a1f-b272-baccfdb6b429) UTF8 on it's own is not enough powershell 7 same but both fixes the issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tacticalrmm#2955
No description provided.