Jump to content











Photo
- - - - -

UCS-2 characters on CDROM/ iso

grub4dos

  • Please log in to reply
No replies to this topic

#1 deomsh

deomsh

    Frequent Member

  • Advanced user
  • 197 posts
  •  
    Netherlands

Posted 21 December 2023 - 03:13 PM

I am working on a grub4dos script to retrieve info from ISO-9660 CD's/ iso's. One of my goals is to view Directory Records. As such everything seems to work.

 

I can view ISO-9660 files and folders using the Primary Volume Descriptor, also UCS-2 using the Secondary Volume Descriptor. In practice UCS-2 will be Joliet, I suppose.

 

So far I found UCS-2 characters looks identical to Long File Names used in FAT. Each character seems to consist out of two bytes: a non-zero character followed by a zero-byte. Correction for big-endian: reversed order (the last zero will be the padding zero of the Directory Record)!

 

This is how my current output looks like:

 

ISOINFO --record2=live-clonezillaasterisk --hex (0xe0) showing UCS-2 characters.png

 

This is how the ISO-9660 output looks like:

 

ISOINFO --record=live-clonezillaasterisk --hex (0xe0) showing UCS-2 characters.png

 

I can't find any information if there are cases/ characters in, let's say, English with a non-zero second first byte.



#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 26 December 2023 - 08:32 AM

Aren't they essentially "plain" Unicode?

 

https://en.wikipedia...d_Character_Set

 

The "normal" characters should be Latin and Latin-1, so within the 0000-00FF range and are corresponding to ASCII:

 

https://www.ssec.wis...va/unicode.html

 

But of course one can use unicode characters in other tables with values 0100 and up, think of -say - Greek or Cyrillic.

 

From what I understand UCS-2 is Unicode "frozen" at a given time, 1993 and ISO/IEC 10646-1:1993 plus Amendments 5 to 7, though I suspect that some software actually uses some more recent encoding (though I never found an example, I would think that modern DVD's can use the € sign :unsure:)

 

:duff:

Wonko



#3 deomsh

deomsh

    Frequent Member

  • Advanced user
  • 197 posts
  •  
    Netherlands

Posted 27 December 2023 - 07:29 PM

Thanks a lot! I will stick on read-out (second) ASCII-part only.

For now I can not read-out DVD (UDF). With UDF-bridge I managed to read-out some volume descriptors, but somehow I can not find the 'real' root directory, so I can't get access to the ISO-9660 directory records. Is there some clue? I studied DVD-ROM_ECMA_TR-71_1st_edition_february_1998.pdf, but I can't find anything meaningful on this subject.

#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 28 December 2023 - 09:08 AM

I am not familiar with UDF, I only know that it is a bit peculiar in the way it is structured, see:

http://web.archive.o...myhome/udf.html

 

These:

https://copyprogramm...find-libdvdread

https://stackoverflo...with-iso-images

can maybe help you.

 

:duff:

Wonko



#5 deomsh

deomsh

    Frequent Member

  • Advanced user
  • 197 posts
  •  
    Netherlands

Posted 29 December 2023 - 01:29 AM

Thanks!

 

Most info seems to be in the specs, very difficult to read for me.

 

With ISO-9660 I was very lucky to have complete examples, including hexa-decimal notation: https://problemkaput...descriptors.htm and https://problemkaput...descriptors.htm

 

One of your links 'triggered' me to a new search-strings, with a very nice result: https://dokumen.tips...tem.html?page=4 (137 detailed PPT's, with examples).

 

I followed most descriptors on my Windows 8.1 and Windows 10 iso's, I believed to be 'real' UDF-Bridge iso's. Although I (have the impression I) learned how to find the start of the UDF Root Directory, the ISO-9660 part does not seem to exist on my iso's: the location of the ISO-9660 Root Directory is almost empty, and without entries. So may be these iso's are a different kind of (fake) UDF-Brigde?



#6 deomsh

deomsh

    Frequent Member

  • Advanced user
  • 197 posts
  •  
    Netherlands

Posted 29 December 2023 - 10:01 PM

The story continues: the more I red about the so called UDF-Bridge Volume Recognition Sequence for the ISO-9660 part, the more I got the 'impression' the Anchor Point etc. are for UDF only. First I thought some translation of the Logical Block Addresses (LBA) could be needed, like in UDF: the relative Logical Block Numbers (LBN) must be converted to the absolute Logical Sector Numbers (LSN).

 

I followed the ISO-9660 Root Directory again on my Win8.1_EnglishInternational_x64.iso and I found a nice README.TXT. Not found by grub4dos'  ls but found by MS-DOS. See the action print-screens:

 

ISOINFO Win8.1_EnglishInternational_x64.iso ISO-9660 UDF-Bridge Primary Volume Descriptor Root-LBA marked red.png ISOINFO Win8.1_EnglishInternational_x64.iso cat --hex 0x1A=Root-LBA and 0x19=README.TXT (not found by ls) with marks.png MSDOS dir U and EDIT REAMDE.TXT Win8.1_EnglishInternational_x64.iso.png

 

So all in all I was 'tricked' by Microsoft, but I learned a lot :)

 

BTW the ISO-9660 Root Directory on my Windows_10.iso (title: ESD_ISO) has no README.TXT, no files at all.



#7 deomsh

deomsh

    Frequent Member

  • Advanced user
  • 197 posts
  •  
    Netherlands

Posted 02 January 2024 - 11:57 AM

Again: Microsoft!

 

But this time not to force UDF on UDF/ ISO Bridge, but to force Joliet. We speak of year 1998...

 

I was testing a 'real' CD to find Directory Records, but following the Root Directory specified in the ISO-9660 Primary Volume Descriptor gave no results, compared to grub4dos' ls. Only the Root Directory specified in the ISO-9660 Supplementary Volume Descriptor could be used this time.

 

Same structure as reported in the post before: only a README.TXT in the Root Directory specified in the ISO-9660 Primary Volume Descriptor.

 

See action Print-screens again:

 

ISOINFO Microsoft ISO-9660 CD Joliet only with marks I.png ISOINFO Microsoft ISO-9660 CD Joliet only, found README.TXT with marks II.png

 

Is there a method to 'filter' for such cases?



#8 deomsh

deomsh

    Frequent Member

  • Advanced user
  • 197 posts
  •  
    Netherlands

Posted 11 January 2024 - 09:28 PM

I added reading of ISO-9660 directories to my script, because grub4dos' ls seems to read-out the 'highest' available directory only.

 

Action print-screen of my Windows 7 32-bits DVD:

 

ISOINFO & view ISO-9660 README.TXT on UDF only Windows 7 32 bit install DVD.png

 

May be of interest to note this DVD can not be mounted anymore with (new) DVD-player on my current system (Windows 10 64-bits), but grub4dos has no problems to mount the disk (using Virtual Box 7).

 

I came across documentation of 'oscdimg' (to make Windows PE iso), above structure with ISO-9660 README is simply an option:

'-u2                                                     

Produces an image that contains only the UDF file system. Any system that cannot read UDF sees only a default text file that alerts the user that this image is only available on computers that support UDF.'

https://learn.micros...view=windows-11

 

But there are other uses: my Samsung SCX-3400 series printer driver CD has different ISO-9660 directories for Windows and Linux. The Primary Volume Descriptor points to the first, the Supplementary Volume Descriptor points to the second directory:

 

ISOINFO SAMSUNG Printer Driver CD with different DIR en DIR2 - ls takes DIR2, DIR is for LINUX I.png

 

BTW: the function to read-out UDF directories was needed earlier already, because grub4dos won't read my UDF v2.50 and UDF v2.60 test iso's (made with ImgBurn). Maybe some bug in grub4dos, or just 'not supported'?







1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users