Hello,
I am new to opencv and completely new to this forum.
I am using opencv2 with python3 under Windows.
I have many directories containing image files which I want to open and display with opencv.
Many file/directory-names contain the character “»”.
I open these files with imread().
imread() returns None.
It definitely depends upon the file/directory name.
Using my scripts with other directories/files with “normal” names works.
As I have many files/directories containing this character and because they are referenced in html-files, renaming them is not an easy option.
I tried quoting the character with a backslash, but this does not help.
I can open and read the files with the normal open() function, so it does not look like a python-problem.
python 2/3 tries to adhere to standard fopen() semantics. documentation for both python 2.7 and 3.9 clearly states that text mode is the default (when neither t nor b is specified), and text mode may touch newlines.
this newline conversion is only done because windows uses CRLF and historically didn’t understand anything else… but these days it – and most programs running on windows! --have no problems with that.