Closed Bug 344342 Opened 18 years ago Closed 18 years ago

utf-8 chars are encoded twice in the mysql db

Categories

(Bugzilla :: Database, defect)

x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 304550

People

(Reporter: brazso, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4 If the utf-8 flag is set among the parameters and I commit a new bug which contains a letter with acute (e.g. in its summary), then the stored character in the mysql db are utf-8 encoded twice. Bugzilla works correctly, it decodes also twice the characters, just I cannot figure out why the db stores the characters in this way. I'm not sure that it is a mysql speciality, or perl encodes/decodes unnecessarily the characters. I'm sorry for the bug if it is related only to mysql, I cannot determine it. Reproducible: Always Steps to Reproduce: 1. enter a new bug - its summary should be "á" (you may get it in notepad with typing ALT+160) - its description is irrelevant 2. in a mysql client check the stored summary - select hex(thetext) from longdescs where bug_id=<bug id from step 1>; Actual Results: C383C2A1 where á is E1 in the ASCII table (of latin1), E1 -utf8-> C3A1 -utf8-> C383C2A1 Expected Results: C3A1 If I set the encoding manually from utf-8 to western (ISO-8859-1) in the browser, then the db stores the wished "C3A1", because mysql stores everything in utf-8 automatically. The checked mysql versions were 4.1 and 5.0 on bugzilla 2.22.
See bug 331583, which has been marked as a duplicate of bug 304550, too. *** This bug has been marked as a duplicate of 304550 ***
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.