Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for API enhancements to handle character encodings other than UTF-8 #3058

Closed
DartBot opened this issue May 15, 2012 · 2 comments
Closed
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-duplicate Closed in favor of an existing report P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented May 15, 2012

This issue was originally filed by TerryMit...@gmail.com


Following to the comment 4 of previous bug (http://code.google.com/p/dart/issues/detail?id=2902), I am opening a new bug on the Shift_JIS encoding.

1:
Chrome says “accept-charset: Shift_JIS,utf-8;q=0.7,*;q=0.3” in its request header. Character set Shift_JIS (Windows-31J) is a commonly used encoding in Japan other than UTF-8. I would suggest Dart team to include Shift_JIS to the Encoding class in the near future.

2:
In order to retrieve Shift_JIS encoded request parameters from the browser, we need some kind of code converters. In case of servlet, we usually retrieve request parameters using method and constructor of class String like:
new String(request.getParameterValues(name)[i].getBytes("8859_1"), "Windows-31J")
The current dart:core.String interface does not have such method and constructor for code conversion.

3:
We also need urlEncode(String, [encoding]) and urlDecode(String, [encoding]) methods like java.net.URLEncoder.encode and java.net.URLDecoder.decode. Default value of the formal parameter encoding is UTF-8. Function urlDecode will be used to decode URL encoded POST body data. Default enctype of HTML Form is “application/x-www-form-urlencoded”. Function urlEncode will be used to generate cookie header data.

4:
Another choice would be to remove the Encoding class and all methods having formal parameter encoding from dart:io library. I am not sure how much the impact of insisting UTF-8 on penetration into Asian markets. It’s up to your company’s global strategy.

@sethladd
Copy link
Contributor

Removed Type-Defect label.
Added Type-Enhancement, Area-Library, Triaged labels.

@DartBot DartBot added Type-Enhancement area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. labels May 16, 2012
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed triaged labels Feb 29, 2016
@lrhn lrhn added the core-m label Aug 11, 2017
@floitschG
Copy link
Contributor

The Encoding class is used by dart:io.

The only thing missing is to add user-defined encodings to the Encodings map. This is covered by #12741 . Closing as a dupe.

@floitschG floitschG added closed-duplicate Closed in favor of an existing report and removed core-m labels Aug 31, 2017
copybara-service bot pushed a commit that referenced this issue Jun 6, 2022
…5 revisions)

https://dart.googlesource.com/dartdoc/+log/8549817bb1b5..f5bcc4bd46f4

2022-06-06 49699333+dependabot[bot]@users.noreply.github.com Bump actions/cache from 3.0.2 to 3.0.3 (#3058)
2022-06-02 106621169+klr981@users.noreply.github.com Issue #3052: up/down arrox bug fix (#3054)
2022-06-01 49699333+dependabot[bot]@users.noreply.github.com Bump ossf/scorecard-action from 1.0.4 to 1.1.0 (#3053)
2022-05-25 kevmoo@users.noreply.github.com Require Dart 2.17, enable and fix latest lints (#3051)
2022-05-25 6655696+guidezpl@users.noreply.github.com Update styles.css (#3046)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: I6c49e95569b83b08c53158079febaeb8a9ab2f64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247301
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-duplicate Closed in favor of an existing report P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

5 participants