Closed
Bug 503520
Opened 17 years ago
Closed 16 years ago
we need to pass mb_strlen() an encoding parameter or it's not accurate
Categories
(addons.mozilla.org Graveyard :: Public Pages, defect)
addons.mozilla.org Graveyard
Public Pages
Tracking
(Not tracked)
VERIFIED
DUPLICATE
of bug 512766
5.1
People
(Reporter: clouserw, Assigned: Milos)
Details
(Whiteboard: [patch])
Attachments
(1 file)
|
3.57 KB,
patch
|
Details | Diff | Splinter Review |
Bug 503502 makes note that mb_strlen() is inaccurate unless we pass it 'utf-8' as it's encoding. Grepping through our tree shows mb_strlen() used a half dozen times but never with a specified encoding.
Example File:
$x = '海';
echo "no encoding: " .mb_strlen($x)."\n";
echo "with encoding: " .mb_strlen($x, 'UTF-8')."\n"
Example Output (run on khan):
no encoding: 3
with encoding: 1
| Reporter | ||
Comment 1•16 years ago
|
||
This should be a quick fix but we'll want to test it out too to make sure stuff isn't depending on the broken code.
Assignee: nobody → bmo
Target Milestone: --- → 5.1
| Assignee | ||
Comment 2•16 years ago
|
||
Attachment #395954 -
Flags: review?(clouserw)
| Assignee | ||
Comment 3•16 years ago
|
||
If we plan to do some thorough testing, maybe we should file a new one for it.
Status: NEW → ASSIGNED
| Reporter | ||
Updated•16 years ago
|
Whiteboard: [patch]
| Reporter | ||
Comment 4•16 years ago
|
||
I know I filed this and asked you to patch it, but in the mean time bug 512766 was filed and it makes more sense to do it that way so I'm forward duping this.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
| Reporter | ||
Updated•16 years ago
|
Attachment #395954 -
Flags: review?(clouserw)
| Assignee | ||
Updated•16 years ago
|
Status: RESOLVED → VERIFIED
Updated•10 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•