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 1068 - problem in win32_file_open when the filename have special characters
Summary: problem in win32_file_open when the filename have special characters
Status: RESOLVED INVALID
Alias: None
Product: SDL
Classification: Unclassified
Component: file (show other bugs)
Version: 1.2.14
Hardware: x86 Windows (XP)
: P2 minor
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-22 22:00 UTC by okr
Modified: 2011-08-21 00:31 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description okr 2010-10-22 22:00:49 UTC
The function win32_file_open convert the original string to UNICODE (line 126, file SDL_rwops.c) and it seems to work, but when the filename have special characteres (ñ, á, ó, etc), the function MultiByteToWideChar delete from the filename these special characteres and fails to open the file. I'm using windows XP sp3, Mexico regional settings.

To resolve this issue, I was disable the unicode string and use the original string, only modifing the line 136 in the file SDL_rwops.c ... using CreateFileA instead CreateFileW, and pasing the original string instead the unicode string.

I'm not an expert in SDL or win32 programming, but by various hours i was googled and not find any information about this problem. 

Sorry if I have mistakes in my report, I'm not an english expert ^^_. And sorry if my report dont have well format, this my first report.
Comment 1 okr 2010-10-22 23:02:17 UTC
I was revised code from SDL 1.3 and the bug seems fixed ... This report must be deleted? ....
Comment 2 Ryan C. Gordon 2011-08-21 00:31:10 UTC
I'm assuming this was because RWOPS doesn't handle codepages, but only UTF-8...?

Closing bug as INVALID (using non-UTF-8 strings isn't a bug in SDL). It looks like you got it working, but please reopen if this is still a problem.

--ryan.