When i try to create a file in LINUX using open() function, i get an error '-1' for the filename that contains extended character (ex: Björk.txt). Here the file contains a special character ö (ASCII 148)
I am using the below code:
char* szUnixPath
/home/user188/Output/Björk.txt
open(szUnixPath, locStyle, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
I always get a -1 error, and NO FILE is created.
As the OS encounters the ASCII 148, it throws an error.
The same function works perfectly fine if i use a tilde ~ (ASCII 126, example: Bj~rk.txt) or any other character below ASCII value 128.
can somebody explain why do i get the -1 error only for filename having special character ranging between 128-255 ?