[jcifs] UnsupportedEncodingException: UnicodeLittleUnmarked

Michael B Allen miallen at ioplex.com
Fri Jan 11 07:50:48 GMT 2008


On Fri, 11 Jan 2008 14:43:04 +0800
"JUNJIE HOU" <junjie.hou at gmail.com> wrote:

> Hi jcifs developers,
> 
>   I encountered a problem when porting jcifs into mobile platforms. The vm
> doesnot support "UnicodeLittleUnmarked" coding;
>   I found the same issue has been talked at:
>   http://lists.samba.org/archive/jcifs/2003-June/002225.html
> 
>   But I don't know how to solve the problem. If I replace all of the
> hard-coded "UnicodeLittleUnmarked" string with something supporting
> encoding, like "UTF-16", can the problem be solved?
> 
>   Can anyone help me?
>   Thanks very much!

I believe the correct solution in this case is to write encoding /
decoding routines that convert between the UCS-2LE used by CIFS and
the UTF-16 used by Java (which if you ignore characters above 0xFFFFF
is just a byte swap) and then adapt all instances where you see
'UnicodeLittleUnmarked' (and any lingering 'UnicodeLittle') to use
your routines.

Mike

-- 
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/


More information about the jcifs mailing list