This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28034 - support <input maxbytes="200">
Summary: support <input maxbytes="200">
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: All All
: P2 enhancement
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-16 12:13 UTC by netmosfera
Modified: 2015-06-17 06:14 UTC (History)
3 users (show)

See Also:


Attachments

Description netmosfera 2015-02-16 12:13:53 UTC
Hello HTML team,

The maxlength attribute is fine as long you don't use a language that requires multibyte sequences for its characters.

<input maxlength="127" maxbytes="127" bytes-charset="UTF8"> 
^ will be stored as UTF8
<input maxlength="127" maxbytes="127" bytes-charset="UTF16">
^ will be stored as UTF16

This means: you are allowed to enter up to 127 characters, as long their size in bytes is lower or equal to 127 bytes using the specified encoding (fallbacks to the accept-charset="" one, or the page's one).

Plenty of web applications already do this check using javascript for preventing form submission of data that would inevitably cause an error (or be truncated).

HTH
Comment 1 Michael[tm] Smith 2015-06-17 06:14:50 UTC
The best way to get feedback on this would be to start a discussion about it on discuss.webplatform.org or public-webapps@w3.org or whatwg@whatwg.org, the re-open this bug if/when there's new information or expressions of implementer support that emerge from those discussions.