Re: Progress Update

"Axel Dörfler" <[email protected]>
Newsgroups gmane.os.openbeos.storage
Message-ID <10113345996-BeMail@nichtsnutz>
Tyler Dauwalder <tyler-cyCl/[email protected]> wrote:
> Well, at least you've been able to accomplish something productive. 
> I've just been plain worthless of late. Meanwhile, Axel appears to 
> have 
> hired a small firm to augment his contributions. ;-)

Damn, was it that obvious=3F ;-))

>... 
> > > Nice!
> > > Just a short question, now that I you've done all the hard work: 
> > > will
> > > the ISO-9660 fs module recognize the Joliet volume name as well=3F
> > > :-)
> Not currently. It's not difficult to find the Joliet volume name, but 
> it has to be converted from Unicode to something useful. Is there a 
> handy way to do that in the kernel, yet=3F If not, do you suppose that 
> might be something worth adding=3F I have to admit that non-ASCII 
> encodings are a bit foreign to me, being a pampered English-only 
> speaker.

Joliet uses unicode, while RockRidge/BeOS uses UTF-8 encoding.
From the upcoming locale kit (for use with OpenTracker first):

void
BUnicodeChar::ToUTF8(uint32 c, char **out)
{
	char *s =3D *out;

	if (c < 0x80)
		*(s++) =3D c;
	else if (c < 0x800) {
		*(s++) =3D 0xc0 | (c >> 6);
		*(s++) =3D 0x80 | (c & 0x3f);
	} else if (c < 0x10000) {
		*(s++) =3D 0xe0 | (c >> 12);
		*(s++) =3D 0x80 | ((c >> 6) & 0x3f);
		*(s++) =3D 0x80 | (c & 0x3f);
	} else if (c <=3D 0x10ffff) {
		*(s++) =3D 0xf0 | (c >> 18);
		*(s++) =3D 0x80 | ((c >> 12) & 0x3f);
		*(s++) =3D 0x80 | ((c >> 6) & 0x3f);
		*(s++) =3D 0x80 | (c & 0x3f);
	}
	*out =3D s;
}

This will do the trick; if you'd find the time, it would be a very nice 
advantage over the original DS-Add-on. But of course, I could also do 
it, if you don't want to :-)

Adios...
   Axel.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.