[jcifs] localization problems

Allen, Michael B (RSCH) Michael_B_Allen at ml.com
Wed Jul 10 08:35:51 EST 2002

> -----Original Message-----
> From:	Dmitry Khlonin [SMTP:dmitry at khlonins.com]
> Sent:	Tuesday, July 09, 2002 4:53 PM
> To:	jcifs at lists.samba.org
> Subject:	[jcifs] localization problems
> I  use jcifs and find some problems in part of localization.
> Some history:
> In russian locale we have about 6 base encodings of russian language in 
> one-byte size
> ( Cp866, Cp1251, KOI8_r,  ISO 8859-5 ...)
> and Unicode and UTF8 at all.
> In the case of mixing in the Windows Network - share names in Cp866 and 
> all other in Unicode
> (this is for NT/2k/XP hosts) and Cp866 for all (for 9x hosts).
> In the code of creating filenames and sharenames from packets I 
> hard-code this encoding
> in the String creating methods (this is only for me), but question - 
> will you have include some parameter
> for jcifs library for case of localization?
	No. JCIFS will negotiate Unicode with each server as necessary. Just pass
	normal Java strings. If you are manually manipulating btye arrays of various
	encodings it will be necesary to use convert them back into their Java String
	equivalent like: new String( bytearray, "cp1251" ) and getBytes( "cp1252" )...etc.

> P.S. Sorry for my bad English

More information about the jcifs mailing list