Jump to content

DBCS filename problem with ISO9660 file system


Fay

Recommended Posts

ImgBurn works perfectly for DBCS (aka Multibyte Character Set) filenames with Joliet or UDF file system.

If the character set is changed to either DOS or ASCII, DBCS works with ISO9660 file system but sort of.

 

I guess ImgBurn is running in UNICODE and it converts UNICODE characters to ISO9660 characters by calling Windows API with specifying some parameters based on the character set selection, either Standard, DOS or ASCII.

 

The problem looks like to me if ImgBurn is truncating the filename byte length to half.

Please note that the filename byte length could be twice of the filename character length in DBCS.

 

Here is the example:

 

UnicodeSbcsStr = L"ABC";

UnicodeDbcsStr = L"@#$"; // Assume @, # and $ are characters used in DBCS.

 

UnicodeStrlen(UnicodeSbcsStr) == 3;

UnicodeStrlen(UnicodeDbcsStr) == 3;

 

SbcsStr = UnicodeToStr(UnicodeSbcsStr);

DbcsStr = UnicodeToStr(UnicodeDbcsStr);

 

Strlen(SbcsStr) == 3;

Strlen(DbcsStr) == 6;

 

SbcsStr == "ABC";

DbcsStr == "@@##$$"; // Single UNICODE character becomes double byte characters.

 

Hope this helps you to understand the problem and are able to fix ImgBurn.

Link to comment
Share on other sites

  • 2 weeks later...

I think this is just due to the way widestring -> ansistring conversion works. It makes a multi byte ansistring where I just want it to convert to straight forward single byte ansi.

 

I've now changed the code to use the WideCharToMultiByte string API for the unicode -> ansi conversion and have told it to use the ANSI codepage via the CP_ACP flag as detailed here http://msdn2.microsoft.com/en-us/library/aa370284.aspx

 

Hopefully that'll fix the issue.

 

If you remember, please do pop back and let me know if it has!

 

(I've no idea when the next version will be ready so it may be a while before you can test it)

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.