[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [JDEV] Further encoding thoughts



Dave Smith wrote:

> One more thought...
>
> What if we did something along these lines for encoding...
>
> <login>
>         <encoding type="ISO-8859-1">
>         <user><![CDATA[...]]></user>
>         <encoding type="UTF8">
>         <pass>APASSWORD</pass>
> </login>
>
> So, everytime a <encoding> tag is encountered, all CDATA segments following
> will be properly escaped and setup to contain data in the specified encoding,
> until another encoding tag is encountered. When the server or client recvs this
> packet and begins walking the DOM, it can be setup to appropriately handle
> different encodings -- if it supports them. Otherwise, it can make a
> "best-guess" about the data, without bothering to check for encoding "hints" and
> try and read it without decoding?!
>
> The only downside to such an approach would be the fact that it requires the
> packet to be reassembled in the order it was created (although any decent DOM
> should do this, right?).
>
> D.

Earlier internationalization schemes used various forms of escapes to switch
encodings/languages. Using escapes tends to bring on a plethora of extra problems.
Personally, I really think it should be avoided.

--
"My new computer's got the clocks, it rocks
But it was obsolete before I opened the box" - W.A.Y.