[jcifs] UnsupportedEncodingException: UnicodeLittleUnmarked

Allen, Michael B (RSCH) Michael_B_Allen at ml.com
Tue Jun 17 09:06:08 EST 2003


This is very strange that your Java implementation does not support the UnicodeLittleUnmarked encoding.
Try running a little program like:

byte b[] = { 0x41, 0x00, 0x42, 0x00, 0x43, 0x00 };
String s = new String( b, "UnicodeLittleUnmarked" );
System.out.println( s );

This should print ABC. If it gives you an exception you'll have a good test to track down the problem with.
Otherwise setting file.encoding alone will not prevent Unicode from be used. You would also need to set
useUnicode=false. But this isn't really the correct way to deal with the problem and it still won't work
because even though jcifs trys to abstract the encoding there are a few places where
"UnicodeLittleUnmarked" is used regardless of wheather or not Unicode is negotiated with the server.

Mike

> -----Original Message-----
> From:	reto.wehrli at switzerland.org [SMTP:reto.wehrli at switzerland.org]
> Sent:	Monday, June 16, 2003 12:07 PM
> To:	jcifs at lists.samba.org
> Subject:	[jcifs] UnsupportedEncodingException: UnicodeLittleUnmarked
> 
> Hi folks
> 
> I am trying to get the NtlmHttpAuthExample.java running. It runs perfectly fine on Windows NT 4.0/Tomcat 4.03/JDK1.3.1_03
> But when I move to Solaris 8/Tomcat 4.03/JDK1.3.1_03 I always receive the following exception:
> 
> java.io.UnsupportedEncodingException: UnicodeLittleUnmarked
> 	at java.lang.Throwable.fillInStackTrace(Native Method)
> 	at java.lang.Throwable.fillInStackTrace(Compiled Code)
> 	at java.lang.Throwable.(Compiled Code)
> 	at java.lang.Exception.(Compiled Code)
> 	at java.io.IOException.(IOException.java:47)
> 	at java.io.UnsupportedEncodingException.(UnsupportedEncodingException.java:37)
> 	at sun.io.Converters.getConverterClass(Compiled Code)
> 	at sun.io.Converters.newConverter(Compiled Code)
> 	at sun.io.ByteToCharConverter.getConverter(Compiled Code)
> 	at java.lang.String.getBTCConverter(Compiled Code)
> 	at java.lang.String.(String.java:403)
> 	at java.lang.String.(String.java:422)
> 	at jcifs.ntlmssp.Type3Message.parse(Type3Message.java:458)
> 	at jcifs.ntlmssp.Type3Message.(Type3Message.java:113)
> 	at jcifs.http.NtlmSsp.doAuthentication(NtlmSsp.java:77)
> 	at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:106)
> ...
> 
> I already tried to set the encoding (file.encoding=...) within tomcat without success.
> I also tired the parameter jcifs.encoding with no success.
> 
> Any idea what I could do more?
> 
> Thanks Reto
> Any idea 




More information about the jcifs mailing list