hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: UnicodeLittleUnmarked or UTF-16LE in NTLM code?
Date Mon, 08 Jul 2013 10:31:03 GMT
On 8 July 2013 11:10, sebb <sebbaz@gmail.com> wrote:
> The NTLM code uses the charset UnicodeLittleUnmarked a lot.
>
> The official page:
>
> http://docs.oracle.com/javase/1.5.0/docs/guide/intl/encoding.doc.html
>
> says they are the same, but different APIs use a different canonical name.
>
> I assume the methods will therefore take either.
>
> Might be worth changing to the slightly shorter - but more obviously
> 16 bit - name?
>
> In any case, extracting as a constant and documenting the choice would
> be a good idea.
> Especially since the code also uses US-ASCII or ASCII sometimes (why?)

I've just been looking at http://davenport.sourceforge.net/ntlm.html
and this says that certain fields always use OEM encoding.
This is documented as being " the local machine's native character set
(DOS codepage)", however the code seems to use ASCII (or US-ASCII) for
this.
That seems wrong - although ASCII is likely to be a subset of the
default encoding, this is not 100% guaranteed.
If the code does make this assumption, I think it should be documented.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message