-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Server-side unicode support (normalization, removing accents) #3174
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
Comments
Added Area-Library, Triaged labels. |
Removed Type-Defect label. |
Issue #7611 has been merged into this issue. |
Is this covered by dart-lang/language#49 ? |
JFYI, I have released unorm_dart which might resolve some of the issue described here. Hope it helps. |
There is an amazing package called diacritic: https://pub.dev/packages/diacritic import 'package:diacritic/diacritic.dart'; void main() { outputs: 'arvizturo tukorfurogep' |
The pub client still won't send analytics with this PR. (This will be enabled in a follow-up). Changes: ``` > git log --format="%C(auto) %h %s" 0764437..35681b0 https://dart.googlesource.com/pub.git/+/35681b01 Analytics (#2778) https://dart.googlesource.com/pub.git/+/9c65d31c Accept 'platforms' property in pubspec.yaml (#3176) https://dart.googlesource.com/pub.git/+/1af0de54 Accept 'screenshots' property in pubspec.yaml (#3174) https://dart.googlesource.com/pub.git/+/19045b95 Tests related to token authentication (#3147) https://dart.googlesource.com/pub.git/+/f36da07f Use applicationConfigHome from package:cli_util (#3164) ``` Diff: https://dart.googlesource.com/pub.git/+/0764437088fd58eb7af779ecef66bab40dfcf2e9~..35681b0126a1fb48bf2062dd09f74296715402c2/ Change-Id: I7313f3125934aba3473b2725074bfc7fd92e25e4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217004 Reviewed-by: Jonas Jensen <[email protected]> Commit-Queue: Sigurd Meldgaard <[email protected]>
+1 the ICU libraries are the gold standard for normalization. |
This issue was originally filed by [email protected]
In Java, I can easily remove accents from strings like this:
Normalizer.normalize(text, Form.NFD).replaceAll("\p{InCombiningDiacriticalMarks}+", "")
My primary use case is to generate URL form user-supplied content (e.g. title).
It would be nice if we could use similar feature in Dart on the server-side. Client-side unicode support in the javascript world might be too large.
The text was updated successfully, but these errors were encountered: