Community discussions

MikroTik App
just joined
Topic Author
Posts: 7
Joined: Mon Oct 31, 2016 8:57 pm

Winbox encoding error when launched from windows command promt

Fri Jun 01, 2018 10:08 am

Hello im trying to add add an addon to my radius server so i can just tab and winbox to their account but the problem is that when passing arguments whit comand promt i get this output.

username and passwords for users containing Turkish characters "ş Ş " when command prompt passes that to winbox they appear as "ÅŸ" i have tried to change command prompt Code Page (chcp) to 857 still same issue i tested whit chrome whit giving url in turkish they work but when i pass the arguments to winbox from command prompt same issue. also it happens at dude to it gives same output to dude.
c:/winbox.exe ş ş appears ÅŸ ÅŸ
Forum Guru
Forum Guru
Posts: 6514
Joined: Mon Apr 20, 2009 9:11 pm

Re: Winbox encoding error when launched from windows command promt

Sat Jun 02, 2018 1:38 am

It's way too soon for national characters in usernames and passwords. Personally I'm waiting until at least 2050, before I dare to try anything like that. There are still too many programs that can't handle it.

In this case it's WinBox (and anything from MikroTik), it doesn't support Unicode, only whatever 8-bit code page the system has, and actually not even that. Anything over basic 7-bit ascii is just a sequence of bytes. If you enter it using WinBox, it displays fine in WinBox on same system. But it's not consistent even with WebFig.

What you see suggests that system passes your special characters to WinBox as Unicode, so two bytes instead of one, and WinBox sees them like that. Even changing codepage using chcp doesn't seem to do anything. I don't know if it's system passing Unicode parameters no matter what, or if WinBox (clearly not caring about codepages at all) reads them wrong.
Excessive quoting is useless and annoying. If you use it, please consider if you could do without it.
Frequent Visitor
Frequent Visitor
Posts: 72
Joined: Thu Oct 26, 2017 11:18 pm

Re: Winbox encoding error when launched from windows command promt

Sat Jun 02, 2018 3:37 am

Even all programming languages that I know do use tricks to make Unicode work, because the Unicode specification is very hard to understand and implement literally how it is specified without many performance constraints. Command prompt as I know, only supports ASCII specifications with ISO-8859 ("ANSI"), even through Windows 10 supports UTF-16 at the kernel level.

So don't use special characters, likely never, outside special message strings.

Who is online

Users browsing this forum: afalck, Ahrefs [Bot], anav, Baidu [Spider], Borizo, Google [Bot], Rockyboa and 48 guests