You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cv2.imwrite("テスト/abc.jpg",img) should save an image to the specified path.
Actual behaviour
Nothing is saved to the path and no error message is provided.
Steps to reproduce
1: Create a directory named "test"
2. Try cv2.imwrite("test/abc.jpg", img). It saves the image to the path as expected.
3. Create another directory named "テスト"
4. Try cv2.imwrite("テスト/abc.jpg", img). Nothing happens.
Windows 10
Python 3.7.3
opencv-python==4.1.0.25
The text was updated successfully, but these errors were encountered:
if you have this string = 'テスト/abc.jpg' You can encode as Windows encoding the characters like this-> print('テスト/abc.jpg'.encode('utf-8').decode('unicode-escape'))
And you get something like this = '���/abc.jpg'
Then if you want to read the file and get the filenames readable and usable, you can use some library to read the filenames of your path and then change the encoding-> #fname is like '���/abc.jpg'
fname.encode('iso-8859-1').decode('utf-8')) # This result of your initial string ='テスト/abc.jpg'
Expected behaviour
cv2.imwrite("テスト/abc.jpg",img) should save an image to the specified path.
Actual behaviour
Nothing is saved to the path and no error message is provided.
Steps to reproduce
1: Create a directory named "test"
2. Try cv2.imwrite("test/abc.jpg", img). It saves the image to the path as expected.
3. Create another directory named "テスト"
4. Try cv2.imwrite("テスト/abc.jpg", img). Nothing happens.
The text was updated successfully, but these errors were encountered: