Livingdeadの日記: file: スキームの URI って標準化されていたっけ? 1
日記 by
Livingdead
Windowsのファイルシステム上のパスを表すURIにおいて、ドライブレターをどう記述するか。結局のところ標準はないらしい。Python の urllib.pathname2url では | (縦棒、縦線)を使うURLに変換されるようだ。
Drive letters are mapped into the top of a file URI in various ways, depending on the implementation; some applications substitute vertical bar ("|") for the colon after the drive letter, yielding "file:///c|/tmp/test.txt". In some cases, the colon is left unchanged, as in "file:///c:/tmp/test.txt". In other cases, the colon is simply omitted, as in "file:///c/tmp/test.txt".
draft-hoffman-file-uri-03 - The file URI Scheme
MSDN (スコア:0)
例示を見る限り|と:の両方使えるらしい。だけどちゃんとした仕様の定義は無いっぽい。
file Protocol [microsoft.com]
CreateUri Function () [microsoft.com]