What encoding used when invoke fopen or open?
When we invoke system call in linux like ' open ' or stdio function like ' fopen ' we must provide a ' const char * filename '. My question is what is the encoding used here? It's utf-8 or ascii or iso8859-x? Does it depend on the system or environment setting? I know in MS Windows there is a _wopen which accept utf-16. It's a byte string, the interpretation is up to the particular filesystem. It depends on the system locale. Look at the output of the "locale" command. If the variables end in UTF-8, then your locale is UTF-8. Most modern linuxes will be using UTF-8. Although Andrew is correct