janodvarko / firecookie

Automatically exported from code.google.com/p/firecookie
Other
0 stars 3 forks source link

Cookie value decoding #123

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
URL-encoded cookie values are automatically interpreted as percent-encoded 
ISO-8859-1 (using unescape() I suppose). I think sending cookies as 
percent-encoded UTF-8 is a much saner and probably more common practice, so 
firecookie should support it.

What steps will reproduce the problem?

1. set a cookie on server side with the value 
"%C3%A1rv%C3%ADzt%C5%B1r%C5%91%20t%C3%BCk%C3%B6rf%C3%BAr%C3%B3g%C3%A9p" 
(percent-encoded UTF-8 for "árvíztűrő tükörfúrógép" [1])
2. check the cookie in firecookie

What is the expected output? What do you see instead?

A few possible behaviors I would find acceptable:
- always show raw cookie text 
("%C3%A1rv%C3%ADzt%C5%B1r%C5%91%20t%C3%BCk%C3%B6rf%C3%BAr%C3%B3g%C3%A9p")
- always show UTF-8 percent-unencoded cookie text ("árvíztűrő 
tükörfúrógép")
- use page encoding to decide how to treat the text (this makes the most sense, 
but I don't know if it is possible to implement)

What version of the product are you using? On what operating system?
Win XP (Hungarian), Firefox 7.0.1 (Hungarian), Firebug 1.8.4 (set to 
Hungarian), firecookie 1.4

The page where I tested it has UTF-8 encoding (both via meta tag and HTTP 
header).

[1] http://en.wikipedia.org/wiki/Mojibake#Hungarian

Original issue reported on code.google.com by gti...@gmail.com on 3 Jan 2012 at 12:39

GoogleCodeExporter commented 9 years ago
Note that Firecookie is integrated into Firebug since version 1.10a11.

Sebastian

Original comment by sebastia...@gmail.com on 24 Jun 2012 at 12:33

GoogleCodeExporter commented 9 years ago
Moved to: Issue fbug:5607

Original comment by sebastia...@gmail.com on 24 Jun 2012 at 12:33