i18n question.

tridge at samba.org tridge at samba.org
Mon Mar 8 07:36:57 GMT 2004


Kenichi,

 > Tridge. This sounds GREAT to me.

good! We're making progress then.

To get you started I have just committed the first NTVFS pass-thru
module for Samba4. Have a look at the ntvfs/nbench/ module in Samba4
cvs code. I wrote this for NBENCH load capturing, but you should be
able to modify it to make a charset filter module quite easily.

In particular look at the PASS_THRU() macro carefully. It deals with
various non-obvious issues with the design of NTVFS and pass-thru
modules. You have to do this sort of fiddly thing to make NTVFS
modules stackable.

A charset translation module will have to be considerably more complex
than the nbench module of course, as you have to translate all string
elements in all elements of all replies, but the principle is the
same.

 > I see your point. Please let me delay this topic until Samba5.
 > By that time, I might simply give up, or might come to some solution.
 > # We have to solve endian problem for this topics too, so I agree
 > # this takes time to solve anyway.

Endian-ness isn't a big issue for this actually. It might seem tricky,
but really it doesn't matter what endian-ness the string constants
are.

The hard bit is that ANSI-C offers no sane way to declare a UTF-16 or
UCS-2 constant string of either endianness. The fact that all of the
system interfaces (such as getpwnam()) are also char* makes it even
harder.

I really don't think this is worth pursuing.

Cheers, Tridge


More information about the samba-technical mailing list