S
S
SwoDs2016-02-03 13:26:33
linux
SwoDs, 2016-02-03 13:26:33

How to delete a file from *unix server using unlink() if there is Cyrillic in the name?

In general, you need to delete files that contain Cyrillic on a unix machine. When I try to delete it, it says the file was not found.


'unlink(/var/www/html/file/test_11_11_11_03.02.2016.pdf): No such file or directory'

If you change the name to Latin, everything is deleted. How to be?
ps the most annoying thing is that everything works in Windows)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SwoDs, 2016-02-03
@SwoDs

In general, the problem was not in unlink (), but in the fact that the program that created the file did not set the correct encoding for the file. unlink() itself works great when respecting the encoding )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question