Both characters are present in iso-8859-1 and iso-8859-2. Try using symbols not from US-ASCII and Latin1.
Latin small letter a with ogonek = ą = "&AQU-" in UTF7-IMAP
Cyrillic small letter ya = я = "&BE8-" in UTF7-IMAP.
Mercury32 tested on WinXP. Old 4.01 registry entries and c:\mercury directory deleted before installing 4.51. Main IMAP client - modified SquirrelMail version. Folder name generation code works same way as in original SquirrelMail version, if PHP install has mbstring support and you use utf-8 translation. I can reproduce same thing with telnet. If I create folder with allowed characters during same IMAP session, create command with invalid characters fails with "NO Path or folder creation error.". System messages window shows "FOLDERV2: Attempt to create folder with 0-length name."
tomas@kirke:~$ telnet 192.168.1.7 143
Trying 192.168.1.7...
Connected to 192.168.1.7.
Escape character is '^]'.
* OK example.org IMAP4rev1 Mercury/32 v4.51 server ready.
A01 login username password
A01 OK LOGIN completed.
A02 create "&AX0-"
A02 OK CREATE complete.
A03 create "&BE8-"
A03 NO Path or folder creation error.
A04 logout
Connection closed by foreign host.
tomas@kirke:~$ telnet 192.168.1.7 143
Trying 192.168.1.7...
Connected to 192.168.1.7.
Escape character is '^]'.
* OK example.org IMAP4rev1 Mercury/32 v4.51 server ready.
A01 login username password
A01 OK LOGIN completed.
A02 create "&BE8-"
Boom
<p>Both characters are present in iso-8859-1 and iso-8859-2. Try using symbols not from US-ASCII and Latin1.
</p>
<p>Latin small letter a with ogonek = ą = "&amp;AQU-" in UTF7-IMAP
</p>
<p>Cyrillic small letter ya = я = "&amp;BE8-" in UTF7-IMAP.
</p>
<p>&nbsp;</p>
<p>Mercury32 tested on WinXP. Old 4.01 registry entries and c:\mercury directory deleted before installing 4.51. Main IMAP client - modified SquirrelMail version. Folder name generation code works same way as in original SquirrelMail version, if PHP install has mbstring support and you use utf-8 translation. I can reproduce same thing with telnet. If I create folder with allowed characters during same IMAP session, create command with invalid characters fails with "NO Path or folder creation error.". System messages window shows "FOLDERV2: Attempt to create folder with 0-length name."
</p>
<pre>tomas@kirke:~$ telnet 192.168.1.7 143
Trying 192.168.1.7...
Connected to 192.168.1.7.
Escape character is '^]'.
* OK example.org IMAP4rev1 Mercury/32 v4.51 server ready.
A01 login username password
A01 OK LOGIN completed.
A02 create "&amp;AX0-"
A02 OK CREATE complete.
A03 create "&amp;BE8-"
A03 NO Path or folder creation error.
A04 logout
Connection closed by foreign host.
tomas@kirke:~$ telnet 192.168.1.7 143
Trying 192.168.1.7...
Connected to 192.168.1.7.
Escape character is '^]'.
* OK example.org IMAP4rev1 Mercury/32 v4.51 server ready.
A01 login username password
A01 OK LOGIN completed.
A02 create "&amp;BE8-"
</pre>
<p>Boom</p>