We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1485 - Problems with non-ASCII chars in image paths in Windows 7
Summary: Problems with non-ASCII chars in image paths in Windows 7
Status: NEW
Alias: None
Product: SDL_image
Classification: Unclassified
Component: misc (show other bugs)
Version: 1.2.12
Hardware: x86 Windows 7
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-27 14:18 UTC by Pere
Modified: 2019-07-31 02:06 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pere 2012-04-27 14:18:14 UTC
Hi, at Tux Paint there is this bug report [1], a quick test with fopen(fname, "r")) goes right, so the images are accesible at the path described by fname.

An additional test is -with the file manager inside W7- to drag a image over showimage.exe, the results are that the image only displays if the chars of the path to the image are all ASCII.

[1] http://sourceforge.net/tracker/?func=detail&aid=3473049&group_id=66938&atid=516295
Comment 1 Pere 2012-05-24 13:54:03 UTC
Well, I followed the trace of the filaname passed to IMG_Load() up to the win32_file_open() function in the SDL-1.2.15/src/file/SDL_rwops.c file, it is unchanged untill arriving there, then it is recoded in this function, thus changing the path and avoiding to load the file.

If in win32_file_open() I force the use of filename as it is passed to the function ( h = CreateFile(filename, (w_right|r_right).....) instead of the recoded filenameW (h = CreateFileW(filenameW, (w_right|r_right), .....), then it loads right the images with non ascii chars on their path.

I don't provide a patch as I don't know enouth the code to understand what side effects this change can have.

Hope this helps
Pere