Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So I have a file in a directory with an unicode name. I wanted to create a link to this elsewhere, but when I tried to do it with a command like mklink file "S:\ディレクトリ\target" in cmd.exe, the result was a broken symlink (the unicode characters showed up as boxes in the command). Running attrib on the links just says "The target of the symbolic link file does not exist", so it certainly seems broken for good.

And now the really annoying part about this: I can't delete the damn thing. Trying to do it in Explorer just tells me I can't, trying to use del from an elevated prompt just gives me "Access is denied." Trying to overwrite the symlink with a new (working) one doesn't work either, just gives me "Cannot create a file when that file already exists."

So, how could I go about deleting this? And as a bonus question, any ideas on how to get symbolic links for unicode paths working?

share|improve this question

1 Answer 1

http://stackoverflow.com/questions/388490/unicode-characters-in-windows-command-line-how

You need to insert the command: chcp 65001

"which will change the code page to UTF-8. Also, you need to use Lucida console fonts."

Also note: "Note there are serious implementation bugs in Windows's code page 65001 support which will break many applications that rely on the C standard library IO methods, so this is very fragile. (Batch files also just stop working in 65001.) Unfortunately UTF-8 is a second-class citizen in Windows"

share|improve this answer
    
Sounds quite fragile indeed. Guess I'll just rename the directories or move the files I want to link instead. Still need a solution for the main issue of getting rid of the broken symlinks, though. –  Daiz Oct 31 '13 at 10:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.