Oct. 23rd, 2004

juan_gandhi: (Default)
How can you detect client-side character encoding and pass it to the server?

The trick is the following:

1. Have a special chunk of text, Unicode-escaped.
2. Have the same chunk of text in native encodings for all the encodings available.
3. In Javascript, compare the first one with the set of encoded texts, until you find the one that matches.
4. You may send information about your discovery back to the server.
5. To make sure you catch the latest setting (user can change it), keep the texts in a form.
6. Of course the fields should be hidden, not to confuse the user.

P.S. It is in the process of being patented, see below.


http://appft1.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sect2=HITOFF&d=PG01
&p=1&u=%2Fnetahtml%2FPTO%2Fsrchnum.html&r=1&f=G&l=50
&s1=%2220040205673%22.PGNR.&OS=DN/20040205673&RS=DN/20040205673

(paste these three lines together and copy the result to the address field in your browser)
juan_gandhi: (Default)
How can you detect client-side character encoding and pass it to the server?

The trick is the following:

1. Have a special chunk of text, Unicode-escaped.
2. Have the same chunk of text in native encodings for all the encodings available.
3. In Javascript, compare the first one with the set of encoded texts, until you find the one that matches.
4. You may send information about your discovery back to the server.
5. To make sure you catch the latest setting (user can change it), keep the texts in a form.
6. Of course the fields should be hidden, not to confuse the user.

P.S. It is in the process of being patented, see below.


http://appft1.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sect2=HITOFF&d=PG01
&p=1&u=%2Fnetahtml%2FPTO%2Fsrchnum.html&r=1&f=G&l=50
&s1=%2220040205673%22.PGNR.&OS=DN/20040205673&RS=DN/20040205673

(paste these three lines together and copy the result to the address field in your browser)

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

May 2025

S M T W T F S
    1 2 3
456 7 8 9 10
11 121314151617
181920 21 222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 24th, 2025 02:26 pm
Powered by Dreamwidth Studios