0

I'm coding a md5 program . The program works well for the string ,so i went to md5 file test.Then everything went beyond my expectation. I copyed the the file path with these steps:

  1. select the file and right click
  2. open the property tab the switch to the security tab
  3. copy the filepath to my code ,edit the backslash stuff how i copy and paste

But the program said that it couldn't find the file .When i moved the file to the current workspace and manually type the filename ,the program sometimes worked while complained for the file not found . It worked ,i don't why.It didn't work, i don't know why .

Confused as i was,i tried to figure out what's wrong and that wasted my day.The i asked someone for help .I sent the source file to my friend .He opened it with vim ,found some suspicious character in the filepath. The suspicious character is :<202a> .After deleted the <202a>, my program worked .Holy crap!

I asked him to get the filepath as i did. But the program still worked .This time i felt like a dumbass. So i get a filepath on my machine as the instruction i just said ,my program reported file not found as before. After some futile trial ,i can see there is an invisible bar at the begin of the path . So that invisible bar was the trouble maker.

So there come the questions:

  1. why there is an unexpected unicode contol character at te begin of path?

  2. why win 8.1 has this issue while win7 doesn't?

  3. how can i disable the nauseous feature on win8.1?

Thank you very much.

spiritsaway
  • 635
  • 1
  • 7
  • 16
  • It might have nothing to do with the version of Windows and everything to do with your language settings. – Mark Ransom Oct 05 '14 at 13:56
  • U+202A is the Left-to-right embedding control character. You cannot see it, it only affects how the subsequent text is rendered. Left-to-right. How it ended up in your string is unguessable from the question, your IME probably has something to do with it. – Hans Passant Oct 05 '14 at 13:58
  • possible duplicate of [0x202A in filename: Why?](http://stackoverflow.com/questions/24037882/0x202a-in-filename-why) – Raymond Chen Oct 05 '14 at 16:55
  • @RaymondChen That is it . But there isn't a solution . I hate to manually type the file path..... – spiritsaway Oct 06 '14 at 12:50
  • You have to manually delete the invisible U+202A. – Raymond Chen Oct 06 '14 at 13:48

0 Answers0