Encoding conversion fallback
Abstract
A system and method for converting a source data sequence to a target encoding is disclosed. A fallback technique, specifiable by a user program component, is applied to data in the source data sequence that cannot be mapped to the target encoding. A particular embodiment involves methods for encoding a Unicode string as a sequence of bytes in a target encoding, and decoded the encoded bytes back to Unicode.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 10 · Forward citations: 15.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method for encoding a Unicode string as a sequence of bytes in a target encoding, the method comprising iteratively performing the following steps: (a) if a fallback buffer is empty, and an input buffer is not empty: getting an input character from the input buffer; if the input character can be represented in the target encoding, encoding the input character; and otherwise, if the input character cannot be represented in the target encoding, executing a specified fallback routine on the input character; (b) if the fallback buffer is not empty: getting a fallback character from the fallback
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (15 of 15 total)
References Cited — Backward Prior Art (10)
Non-Patent Literature (5)
- "ASCII Encoding Class." .NET Framework Class Library. Available at <http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemtextasciiencodingclasstopic.asp>, Nov. 6, 2003.
- "ASCIIEncoding Constructor." .NET Framework Class Library. Available at <http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemtextasciiencodingclassctortopic.asp>, Nov. 6, 2003.
- "ASCIIEncoding Members." .NET Framework Class Library. Available at <http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemtextasciiencodingmemberstopic.asp>, Nov. 6, 2003.
- "Conversion Object." Available at <http://msdn.microsoft.com/workshop/misc/mlang/reference/objects/cmlangconvertcharset.asp>, Nov. 6, 2003.
- "ConvertINetMultiByteToUnicode Function." Available at <http://msdn.microsoft.com/workshop/misc/mlang/reference/functions/convertinetmultibytetounicode.asp>, Nov. 6, 2003.