PoshGram
PoshGram copied to clipboard
Cyrillic file name
Hello! When I try to send a file with cyrillic characters in name to telegram
$botToken = "xxxx"
$chat = "xxxx"
$file = "C:\абв г.txt"
$sendTelegramLocalDocumentSplat = @{
BotToken = $botToken
ChatID = $chat
File = $file
Caption = "Check out this file"
ParseMode = 'MarkdownV2'
DisableNotification = $true
Verbose = $true
}
Send-TelegramLocalDocument @sendTelegramLocalDocumentSplat
I get the file with this name
= utf-8 B 0LDQsdCyINCzLnR4dA== =
There are no such problems with names in English or numbers.
I have been able to reproduce this.
Unfortunately, I have yet to figure out how to solve it.
It seems that when Get-Item picks up the file it doesn't encode it in a way that honors the cyrillic characters.
I have tried various workarounds without success.
This may be more of a PowerShell limitation than a PoshGram limitation.