diff options
Diffstat (limited to 'doc/bugs/Unicode_file_names_ignored_on_Windows/comment_7_b23a2bf106053f105798b270536057e5._comment')
-rw-r--r-- | doc/bugs/Unicode_file_names_ignored_on_Windows/comment_7_b23a2bf106053f105798b270536057e5._comment | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/doc/bugs/Unicode_file_names_ignored_on_Windows/comment_7_b23a2bf106053f105798b270536057e5._comment b/doc/bugs/Unicode_file_names_ignored_on_Windows/comment_7_b23a2bf106053f105798b270536057e5._comment deleted file mode 100644 index b5cf90ef0..000000000 --- a/doc/bugs/Unicode_file_names_ignored_on_Windows/comment_7_b23a2bf106053f105798b270536057e5._comment +++ /dev/null @@ -1,38 +0,0 @@ -[[!comment format=mdwn - username="https://www.google.com/accounts/o8/id?id=AItOawk5aY0oBmuQtnoTNtji-dPgDw9p7J24YeY" - nickname="Jiří" - subject="further info 3" - date="2014-03-19T16:23:58Z" - content=""" -Also ghc doesn't seem to do any weird transformations with that string - - import System.Process - import qualified Data.ByteString as S - import qualified Data.ByteString.UTF8 as U - import GHC.IO.Handle - - files :: S.ByteString -> [S.ByteString] - files ps - | S.null ps = [] - | otherwise = case search ps of - Nothing -> [ps] - Just n -> S.take n ps : files (S.drop (n+1) ps) - where search = S.elemIndex 0 - - main = do - let prc = CreateProcess { - cmdspec = RawCommand \"git\" [\"--work-tree=D:\\antest\",\"ls-files\",\"--others\",\"-z\",\"--\",\"h\225\269ky.txt\"], - cwd = Nothing, - env = Nothing, - std_in = Inherit, - std_out = CreatePipe, - std_err = Inherit, - close_fds = False, - create_group = False } - (_,Just out,_,_) <- createProcess prc - hSetBinaryMode out True - str <- S.hGetContents out - print $ map U.toString $ files str - -prints correctly [\"h\225\269ky.txt\"] I don't think that FilesystemEncoding will do any good on windows, since git seems to use utf-8 instead of normal windows console encoding. -"""]] |