punycoder
0.3.0, released 9 months ago by dropbear.dev
Pure Dart implementation of the RFC 3492 Punycode specification for encoding and decoding.
WASM-ready
What it does
Provides encoding and decoding of Punycode strings, as well as helpers for Internationalized Domain Names (IDN) and email addresses. It supports mixed-case annotation and standard IDNA validation rules.
AI-written summary of version 0.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to convert internationalized domain names or emails to and from ASCII/Punycode.
- You are working with Punycode encoding in a pure Dart or cross-platform application.
Skip it when
- You are not dealing with internationalized domains, emails, or raw Punycode strings.
Strengths
- Full RFC 3492 compliance with official errata fixes
- Supports mixed-case annotation via Appendix A
- Implements `Codec<String, String>` for integration with `dart:convert`
Weaknesses
- Niche functionality limited specifically to Punycode and IDNA tasks
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:punycoder/punycoder.dart';
final encoded = punycode.encode('münchen'); // mnchen-3ya
final decoded = punycode.decode('mnchen-3ya'); // münchen
final domainAscii = domainToAscii('mañana.com'); // xn--maana-pta.comWorks with
Packages commonly used together with punycoder: ones it builds on, ones built on it, and its own family.