When trying to register a custom protocol handler (like mailto etc.) I found out that there seem to be some limitations on Windows 8 concerning the length of the URL scheme string.
The official standard says that a URL scheme must look like this:
scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
But on Windows 8 I found that the following is the case:
NOT working:
a.a.a.a.a.a.a.a.a.a.a.a.a (25 chars, 13 letters)
aaaaaaaaaaaaaa (14 chars, 14 letters)
aaaaaaaaaaaaa (13 chars, 13 letters)
WORKING:
a.a.a.a.a.a.a.a.a.a.a.a (23 chars, 12 letters)
aaaaaa.aaaaaa (13 chars, 12 letters)
aaaaaaaaaaaa (12 chars, 12 letters)
My hypothesis after some trying is that the URL scheme length must not exceed 12 characters excluding dots (I didn't try "+" and "-").
I am registering the URL scheme as described for example in this answer (because I want my app to be listed in that Windows 8 modern UI "open with" dialog).
i.e. something like this (shortened):
HKEY_CURRENT_USER\Software\Classes\myapp.ProtocolHandler
(Default) = "urlscheme"
Shell\Open\command
(Default) = C:\path\to\my\app.exe %1
HKCU\SOFTWARE\mypublisher\myapp\Capabilities\URLAssociations
urlscheme = myapp.ProtocolHandler
HKCU\SOFTWARE\RegisteredApplications
mypublisher_myapp = Software\mypublisher\myapp\Capabilities
I couldn't find any official information about this limitation.
Can anybody explain me what is wrong here in my case or if that really is a limitation of the system?