Bug introduced in 10.0.0 and fixed in 10.1
UPDATE: Now both the inputs "\б"
and "\\б"
are interpreted as "\\б"
and displayed in OutputForm
as "\б"
, InputForm["\б"]
returns "\\б"
and StringLength["\\б"]
returns 2
.
Consider:
"\бвгд" // FullForm
"\\бвгд" // FullForm
In v.8.0.4 I get this:
"\\:0431\:0432\:0433\:0434" "\\\:0431\:0432\:0433\:0434"
But v.10.0.0 adds redundant backslash before the first backslashed Cyrillic symbol:
"\\\:0431\:0432\:0433\:0434" "\\\\:0431\:0432\:0433\:0434"
As the result it is not possible to open any file which name (or name of a directory in the path) starts from a Cyrillic symbol.
Also after evaluating the above (in the case the Cyrillic symbols were typed, not pasted in the Notebook) the following bugs appear:
When I try to cut by pressing
Ctrl+X
anyCell
or group of cells in this Notebook I get http://demonstrations.wolfram.com/ opened in my browser and nothing changed in the FrontEndAfter some additional editing (entering backslashed Cyrillic symbols after the quote
"
but without entering the closing quote and without evaluation of the cell) an attempt to cut an input cell by pressingCtrl+X
results in commenting all the code in the selected input cell. PressingCtrl+X
again uncomments the code.
All the above manipulations with Ctrl+X
give this result when English keyboard locale is selected.
Does anyone also observe this? Is there a workaround?
P.S. OS Win7 x64.
Import["алексей\попков","Text"]
>привет!
$\endgroup$Import
is to useFileNameJoin
. $\endgroup$"\\:0431\:0432\:0433\:0434"
is properly formed -- that is, I think the bug is in V8.0.4 (and V9.0.1, too). If I paste the string in V8.0.4 and execute it, the output displays as nine characters,\:0431вгд
, which seems the proper interpretation (compare withStringLength["\бвгд"]
). A similar thing happens with other unicode characters. That it used to work suggests offsetting bugs or intentional flexibility in processing resource-locator strings. Similarly, the V10 string"\\\\:0431\:0432\:0433\:0434"
seems to be missing a backslash. $\endgroup$FileNameJoin
anyway, or do you mean it's not working? (Btw, I don't have Windows, so I can only check the filename string in Mma; I can't check whether the file can be opened with the string.) $\endgroup$