< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 453
Coverable lines: 453
Total lines: 587
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 30
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
File 1: .ctor()100%110%
File 1: Fallback(...)0%440%
File 1: Fallback(...)0%660%
File 1: GetNextChar()0%440%
File 1: MovePrevious()0%440%
File 1: Reset()100%110%
File 1: TryBestFit(...)0%10100%

File(s)

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/System.Private.CoreLib/src/System/Text/EncoderLatin1BestFitFallback.cs

#LineLine coverage
 1// Licensed to the .NET Foundation under one or more agreements.
 2// The .NET Foundation licenses this file to you under the MIT license.
 3
 4//
 5// This is used internally to create best fit behavior as per the original windows best fit behavior.
 6//
 7
 8using System.Diagnostics;
 9using System.Globalization;
 10
 11namespace System.Text
 12{
 13    internal sealed class EncoderLatin1BestFitFallback : EncoderFallback
 14    {
 15        // Provides access to the singleton instance of this fallback mechanism
 16        internal static readonly EncoderLatin1BestFitFallback SingletonInstance = new EncoderLatin1BestFitFallback();
 17
 18        private EncoderLatin1BestFitFallback()
 19        {
 20        }
 21
 22        public override EncoderFallbackBuffer CreateFallbackBuffer() =>
 23            new EncoderLatin1BestFitFallbackBuffer();
 24
 25        // Maximum number of characters that this instance of this fallback could return
 26        public override int MaxCharCount => 1;
 27    }
 28
 29    internal sealed partial class EncoderLatin1BestFitFallbackBuffer : EncoderFallbackBuffer
 30    {
 31        // Our variables
 32        private char _cBestFit;
 033        private int _iCount = -1;
 34        private int _iSize;
 35
 36        // Fallback methods
 37        public override bool Fallback(char charUnknown, int index)
 38        {
 39            // If we had a buffer already we're being recursive, throw, it's probably at the suspect
 40            // character in our array.
 41            // Shouldn't be able to get here for all of our code pages, table would have to be messed up.
 042            Debug.Assert(_iCount < 1, $"[EncoderLatin1BestFitFallbackBuffer.Fallback(non surrogate)] Fallback char {(int
 43
 044            _iCount = _iSize = 1;
 045            _cBestFit = TryBestFit(charUnknown);
 046            if (_cBestFit == '\0')
 047                _cBestFit = '?';
 48
 049            return true;
 50        }
 51
 52        public override bool Fallback(char charUnknownHigh, char charUnknownLow, int index)
 53        {
 54            // Double check input surrogate pair
 055            if (!char.IsHighSurrogate(charUnknownHigh))
 056                throw new ArgumentOutOfRangeException(nameof(charUnknownHigh),
 057                    SR.Format(SR.ArgumentOutOfRange_Range,
 058                    0xD800, 0xDBFF));
 59
 060            if (!char.IsLowSurrogate(charUnknownLow))
 061                throw new ArgumentOutOfRangeException(nameof(charUnknownLow),
 062                    SR.Format(SR.ArgumentOutOfRange_Range,
 063                    0xDC00, 0xDFFF));
 64
 65            // If we had a buffer already we're being recursive, throw, it's probably at the suspect
 66            // character in our array.  0 is processing last character, < 0 is not falling back
 67            // Shouldn't be able to get here, table would have to be messed up.
 068            Debug.Assert(_iCount < 1, $"[EncoderLatin1BestFitFallbackBuffer.Fallback(surrogate)] Fallback char {(int)_cB
 69
 70            // Go ahead and get our fallback, surrogates don't have best fit
 071            _cBestFit = '?';
 072            _iCount = _iSize = 2;
 73
 074            return true;
 75        }
 76
 77        // Default version is overridden in EncoderReplacementFallback.cs
 78        public override char GetNextChar()
 79        {
 80            // We want it to get < 0 because == 0 means that the current/last character is a fallback
 81            // and we need to detect recursion.  We could have a flag but we already have this counter.
 082            _iCount--;
 83
 84            // Do we have anything left? 0 is now last fallback char, negative is nothing left
 085            if (_iCount < 0)
 086                return '\0';
 87
 88            // Need to get it out of the buffer.
 89            // Make sure it didn't wrap from the fast count-- path
 090            if (_iCount == int.MaxValue)
 91            {
 092                _iCount = -1;
 093                return '\0';
 94            }
 95
 96            // Return the best fit character
 097            return _cBestFit;
 98        }
 99
 100        public override bool MovePrevious()
 101        {
 102            // Exception fallback doesn't have anywhere to back up to.
 0103            if (_iCount >= 0)
 0104                _iCount++;
 105
 106            // Return true if we could do it.
 0107            return _iCount >= 0 && _iCount <= _iSize;
 108        }
 109
 110        // How many characters left to output?
 0111        public override int Remaining => (_iCount > 0) ? _iCount : 0;
 112
 113        // Clear the buffer
 114        public override unsafe void Reset()
 115        {
 0116            _iCount = -1;
 0117            charStart = null;
 0118            bFallingBack = false;
 0119        }
 120
 121        // private helper methods
 122        private static char TryBestFit(char cUnknown)
 123        {
 124            // Need to figure out our best fit character, low is beginning of array, high is 1 AFTER end of array
 0125            int lowBound = 0;
 0126            int highBound = ArrayCharBestFit.Length;
 127            int index;
 128
 129            // Binary search the array
 130            int iDiff;
 0131            while ((iDiff = (highBound - lowBound)) > 6)
 132            {
 133                // Look in the middle, which is complicated by the fact that we have 2 #s for each pair,
 134                // so we don't want index to be odd because we want to be on word boundaries.
 135                // Also note that index can never == highBound (because diff is rounded down)
 0136                index = ((iDiff / 2) + lowBound) & 0xFFFE;
 137
 0138                char cTest = ArrayCharBestFit[index];
 0139                if (cTest == cUnknown)
 140                {
 141                    // We found it
 0142                    Debug.Assert(index + 1 < ArrayCharBestFit.Length,
 0143                        "[EncoderLatin1BestFitFallbackBuffer.TryBestFit]Expected replacement character at end of array")
 0144                    return ArrayCharBestFit[index + 1];
 145                }
 0146                else if (cTest < cUnknown)
 147                {
 148                    // We weren't high enough
 0149                    lowBound = index;
 150                }
 151                else
 152                {
 153                    // We weren't low enough
 0154                    highBound = index;
 155                }
 156            }
 157
 0158            for (index = lowBound; index < highBound; index += 2)
 159            {
 0160                if (ArrayCharBestFit[index] == cUnknown)
 161                {
 162                    // We found it
 0163                    Debug.Assert(index + 1 < ArrayCharBestFit.Length,
 0164                        "[EncoderLatin1BestFitFallbackBuffer.TryBestFit]Expected replacement character at end of array")
 0165                    return ArrayCharBestFit[index + 1];
 166                }
 167            }
 168
 169            // Char wasn't in our table
 0170            return '\0';
 171        }
 172    }
 173}
 174

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/System.Private.CoreLib/src/System/Text/EncoderLatin1BestFitFallback.Data.cs

#LineLine coverage
 1// Licensed to the .NET Foundation under one or more agreements.
 2// The .NET Foundation licenses this file to you under the MIT license.
 3
 4namespace System.Text
 5{
 6    internal sealed partial class EncoderLatin1BestFitFallbackBuffer
 7    {
 8        // Best fit for ASCII, and since it works for ASCII, we use it for latin1 as well.
 9        private static ReadOnlySpan<char> ArrayCharBestFit =>
 010        [
 011// The first many are in case you wanted to use this for ASCIIEncoding, which we don't need to do any more.
 012//          (char)0x00a0, (char)0x0020,    // No-Break Space -> Space
 013//          (char)0x00a1, (char)0x0021,    // Inverted Exclamation Mark -> !
 014//          (char)0x00a2, (char)0x0063,    // Cent Sign -> c
 015//          (char)0x00a3, (char)0x003f,    // Pound Sign
 016//          (char)0x00a4, (char)0x0024,    // Currency Sign -> $
 017//          (char)0x00a5, (char)0x0059,    // Yen Sign -> Y
 018//          (char)0x00a6, (char)0x007c,    // Broken Bar -> |
 019//          (char)0x00a7, (char)0x003f,    // Section Sign
 020//          (char)0x00a8, (char)0x003f,    // Diaeresis
 021//          (char)0x00a9, (char)0x0043,    // Copyright Sign -> C
 022//          (char)0x00aa, (char)0x0061,    // Feminine Ordinal Indicator -> a
 023//          (char)0x00ab, (char)0x003c,    // Left-Pointing Double Angle Quotation Mark -> <
 024//          (char)0x00ac, (char)0x003f,    // Not Sign
 025//          (char)0x00ad, (char)0x002d,    // Soft Hyphen -> -
 026//          (char)0x00ae, (char)0x0052,    // Registered Sign -> R
 027//          (char)0x00af, (char)0x003f,    // Macron
 028//          (char)0x00b0, (char)0x003f,    // Degree Sign
 029//          (char)0x00b1, (char)0x003f,    // Plus-Minus Sign
 030//          (char)0x00b2, (char)0x0032,    // Superscript Two -> 2
 031//          (char)0x00b3, (char)0x0033,    // Superscript Three -> 3
 032//          (char)0x00b4, (char)0x003f,    // Acute Accent
 033//          (char)0x00b5, (char)0x003f,    // Micro Sign
 034//          (char)0x00b6, (char)0x003f,    // Pilcrow Sign
 035//          (char)0x00b7, (char)0x002e,    // Middle Dot -> .
 036//          (char)0x00b8, (char)0x002c,    // Cedilla -> ,
 037//          (char)0x00b9, (char)0x0031,    // Superscript One -> 1
 038//          (char)0x00ba, (char)0x006f,    // Masculine Ordinal Indicator -> o
 039//          (char)0x00bb, (char)0x003e,    // Right-Pointing Double Angle Quotation Mark -> >
 040//          (char)0x00bc, (char)0x003f,    // Vulgar Fraction One Quarter
 041//          (char)0x00bd, (char)0x003f,    // Vulgar Fraction One Half
 042//          (char)0x00be, (char)0x003f,    // Vulgar Fraction Three Quarters
 043//          (char)0x00bf, (char)0x003f,    // Inverted Question Mark
 044//          (char)0x00c0, (char)0x0041,    // Latin Capital Letter A With Grave -> A
 045//          (char)0x00c1, (char)0x0041,    // Latin Capital Letter A With Acute -> A
 046//          (char)0x00c2, (char)0x0041,    // Latin Capital Letter A With Circumflex -> A
 047//          (char)0x00c3, (char)0x0041,    // Latin Capital Letter A With Tilde -> A
 048//          (char)0x00c4, (char)0x0041,    // Latin Capital Letter A With Diaeresis -> A
 049//          (char)0x00c5, (char)0x0041,    // Latin Capital Letter A With Ring Above -> A
 050//          (char)0x00c6, (char)0x0041,    // Latin Capital Ligature Ae -> A
 051//          (char)0x00c7, (char)0x0043,    // Latin Capital Letter C With Cedilla -> C
 052//          (char)0x00c8, (char)0x0045,    // Latin Capital Letter E With Grave -> E
 053//          (char)0x00c9, (char)0x0045,    // Latin Capital Letter E With Acute -> E
 054//          (char)0x00ca, (char)0x0045,    // Latin Capital Letter E With Circumflex -> E
 055//          (char)0x00cb, (char)0x0045,    // Latin Capital Letter E With Diaeresis -> E
 056//          (char)0x00cc, (char)0x0049,    // Latin Capital Letter I With Grave -> I
 057//          (char)0x00cd, (char)0x0049,    // Latin Capital Letter I With Acute -> I
 058//          (char)0x00ce, (char)0x0049,    // Latin Capital Letter I With Circumflex -> I
 059//          (char)0x00cf, (char)0x0049,    // Latin Capital Letter I With Diaeresis -> I
 060//          (char)0x00d0, (char)0x0044,    // Latin Capital Letter Eth -> D
 061//          (char)0x00d1, (char)0x004e,    // Latin Capital Letter N With Tilde -> N
 062//          (char)0x00d2, (char)0x004f,    // Latin Capital Letter O With Grave -> O
 063//          (char)0x00d3, (char)0x004f,    // Latin Capital Letter O With Acute -> O
 064//          (char)0x00d4, (char)0x004f,    // Latin Capital Letter O With Circumflex -> O
 065//          (char)0x00d5, (char)0x004f,    // Latin Capital Letter O With Tilde -> O
 066//          (char)0x00d6, (char)0x004f,    // Latin Capital Letter O With Diaeresis -> O
 067//          (char)0x00d7, (char)0x003f,    // Multiplication Sign
 068//          (char)0x00d8, (char)0x004f,    // Latin Capital Letter O With Stroke -> O
 069//          (char)0x00d9, (char)0x0055,    // Latin Capital Letter U With Grave -> U
 070//          (char)0x00da, (char)0x0055,    // Latin Capital Letter U With Acute -> U
 071//          (char)0x00db, (char)0x0055,    // Latin Capital Letter U With Circumflex -> U
 072//          (char)0x00dc, (char)0x0055,    // Latin Capital Letter U With Diaeresis -> U
 073//          (char)0x00dd, (char)0x0059,    // Latin Capital Letter Y With Acute -> Y
 074//          (char)0x00de, (char)0x003f,    // Latin Capital Letter Thorn
 075//          (char)0x00df, (char)0x003f,    // Latin Small Letter Sharp S
 076//          (char)0x00e0, (char)0x0061,    // Latin Small Letter A With Grave -> a
 077//          (char)0x00e1, (char)0x0061,    // Latin Small Letter A With Acute -> a
 078//          (char)0x00e2, (char)0x0061,    // Latin Small Letter A With Circumflex -> a
 079//          (char)0x00e3, (char)0x0061,    // Latin Small Letter A With Tilde -> a
 080//          (char)0x00e4, (char)0x0061,    // Latin Small Letter A With Diaeresis -> a
 081//          (char)0x00e5, (char)0x0061,    // Latin Small Letter A With Ring Above -> a
 082//          (char)0x00e6, (char)0x0061,    // Latin Small Ligature Ae -> a
 083//          (char)0x00e7, (char)0x0063,    // Latin Small Letter C With Cedilla -> c
 084//          (char)0x00e8, (char)0x0065,    // Latin Small Letter E With Grave -> e
 085//          (char)0x00e9, (char)0x0065,    // Latin Small Letter E With Acute -> e
 086//          (char)0x00ea, (char)0x0065,    // Latin Small Letter E With Circumflex -> e
 087//          (char)0x00eb, (char)0x0065,    // Latin Small Letter E With Diaeresis -> e
 088//          (char)0x00ec, (char)0x0069,    // Latin Small Letter I With Grave -> i
 089//          (char)0x00ed, (char)0x0069,    // Latin Small Letter I With Acute -> i
 090//          (char)0x00ee, (char)0x0069,    // Latin Small Letter I With Circumflex -> i
 091//          (char)0x00ef, (char)0x0069,    // Latin Small Letter I With Diaeresis -> i
 092//          (char)0x00f0, (char)0x003f,    // Latin Small Letter Eth
 093//          (char)0x00f1, (char)0x006e,    // Latin Small Letter N With Tilde -> n
 094//          (char)0x00f2, (char)0x006f,    // Latin Small Letter O With Grave -> o
 095//          (char)0x00f3, (char)0x006f,    // Latin Small Letter O With Acute -> o
 096//          (char)0x00f4, (char)0x006f,    // Latin Small Letter O With Circumflex -> o
 097//          (char)0x00f5, (char)0x006f,    // Latin Small Letter O With Tilde -> o
 098//          (char)0x00f6, (char)0x006f,    // Latin Small Letter O With Diaeresis -> o
 099//          (char)0x00f7, (char)0x003f,    // Division Sign
 0100//          (char)0x00f8, (char)0x006f,    // Latin Small Letter O With Stroke -> o
 0101//          (char)0x00f9, (char)0x0075,    // Latin Small Letter U With Grave -> u
 0102//          (char)0x00fa, (char)0x0075,    // Latin Small Letter U With Acute -> u
 0103//          (char)0x00fb, (char)0x0075,    // Latin Small Letter U With Circumflex -> u
 0104//          (char)0x00fc, (char)0x0075,    // Latin Small Letter U With Diaeresis -> u
 0105//          (char)0x00fd, (char)0x0079,    // Latin Small Letter Y With Acute -> y
 0106//          (char)0x00fe, (char)0x003f,    // Latin Small Letter Thorn
 0107//          (char)0x00ff, (char)0x0079,    // Latin Small Letter Y With Diaeresis -> y
 0108            (char)0x0100, (char)0x0041,    // Latin Capital Letter A With Macron -> A
 0109            (char)0x0101, (char)0x0061,    // Latin Small Letter A With Macron -> a
 0110            (char)0x0102, (char)0x0041,    // Latin Capital Letter A With Breve -> A
 0111            (char)0x0103, (char)0x0061,    // Latin Small Letter A With Breve -> a
 0112            (char)0x0104, (char)0x0041,    // Latin Capital Letter A With Ogonek -> A
 0113            (char)0x0105, (char)0x0061,    // Latin Small Letter A With Ogonek -> a
 0114            (char)0x0106, (char)0x0043,    // Latin Capital Letter C With Acute -> C
 0115            (char)0x0107, (char)0x0063,    // Latin Small Letter C With Acute -> c
 0116            (char)0x0108, (char)0x0043,    // Latin Capital Letter C With Circumflex -> C
 0117            (char)0x0109, (char)0x0063,    // Latin Small Letter C With Circumflex -> c
 0118            (char)0x010a, (char)0x0043,    // Latin Capital Letter C With Dot Above -> C
 0119            (char)0x010b, (char)0x0063,    // Latin Small Letter C With Dot Above -> c
 0120            (char)0x010c, (char)0x0043,    // Latin Capital Letter C With Caron -> C
 0121            (char)0x010d, (char)0x0063,    // Latin Small Letter C With Caron -> c
 0122            (char)0x010e, (char)0x0044,    // Latin Capital Letter D With Caron -> D
 0123            (char)0x010f, (char)0x0064,    // Latin Small Letter D With Caron -> d
 0124            (char)0x0110, (char)0x0044,    // Latin Capital Letter D With Stroke -> D
 0125            (char)0x0111, (char)0x0064,    // Latin Small Letter D With Stroke -> d
 0126            (char)0x0112, (char)0x0045,    // Latin Capital Letter E With Macron -> E
 0127            (char)0x0113, (char)0x0065,    // Latin Small Letter E With Macron -> e
 0128            (char)0x0114, (char)0x0045,    // Latin Capital Letter E With Breve -> E
 0129            (char)0x0115, (char)0x0065,    // Latin Small Letter E With Breve -> e
 0130            (char)0x0116, (char)0x0045,    // Latin Capital Letter E With Dot Above -> E
 0131            (char)0x0117, (char)0x0065,    // Latin Small Letter E With Dot Above -> e
 0132            (char)0x0118, (char)0x0045,    // Latin Capital Letter E With Ogonek -> E
 0133            (char)0x0119, (char)0x0065,    // Latin Small Letter E With Ogonek -> e
 0134            (char)0x011a, (char)0x0045,    // Latin Capital Letter E With Caron -> E
 0135            (char)0x011b, (char)0x0065,    // Latin Small Letter E With Caron -> e
 0136            (char)0x011c, (char)0x0047,    // Latin Capital Letter G With Circumflex -> G
 0137            (char)0x011d, (char)0x0067,    // Latin Small Letter G With Circumflex -> g
 0138            (char)0x011e, (char)0x0047,    // Latin Capital Letter G With Breve -> G
 0139            (char)0x011f, (char)0x0067,    // Latin Small Letter G With Breve -> g
 0140            (char)0x0120, (char)0x0047,    // Latin Capital Letter G With Dot Above -> G
 0141            (char)0x0121, (char)0x0067,    // Latin Small Letter G With Dot Above -> g
 0142            (char)0x0122, (char)0x0047,    // Latin Capital Letter G With Cedilla -> G
 0143            (char)0x0123, (char)0x0067,    // Latin Small Letter G With Cedilla -> g
 0144            (char)0x0124, (char)0x0048,    // Latin Capital Letter H With Circumflex -> H
 0145            (char)0x0125, (char)0x0068,    // Latin Small Letter H With Circumflex -> h
 0146            (char)0x0126, (char)0x0048,    // Latin Capital Letter H With Stroke -> H
 0147            (char)0x0127, (char)0x0068,    // Latin Small Letter H With Stroke -> h
 0148            (char)0x0128, (char)0x0049,    // Latin Capital Letter I With Tilde -> I
 0149            (char)0x0129, (char)0x0069,    // Latin Small Letter I With Tilde -> i
 0150            (char)0x012a, (char)0x0049,    // Latin Capital Letter I With Macron -> I
 0151            (char)0x012b, (char)0x0069,    // Latin Small Letter I With Macron -> i
 0152            (char)0x012c, (char)0x0049,    // Latin Capital Letter I With Breve -> I
 0153            (char)0x012d, (char)0x0069,    // Latin Small Letter I With Breve -> i
 0154            (char)0x012e, (char)0x0049,    // Latin Capital Letter I With Ogonek -> I
 0155            (char)0x012f, (char)0x0069,    // Latin Small Letter I With Ogonek -> i
 0156            (char)0x0130, (char)0x0049,    // Latin Capital Letter I With Dot Above -> I
 0157            (char)0x0131, (char)0x0069,    // Latin Small Letter Dotless I -> i
 0158            (char)0x0134, (char)0x004a,    // Latin Capital Letter J With Circumflex -> J
 0159            (char)0x0135, (char)0x006a,    // Latin Small Letter J With Circumflex -> j
 0160            (char)0x0136, (char)0x004b,    // Latin Capital Letter K With Cedilla -> K
 0161            (char)0x0137, (char)0x006b,    // Latin Small Letter K With Cedilla -> k
 0162            (char)0x0139, (char)0x004c,    // Latin Capital Letter L With Acute -> L
 0163            (char)0x013a, (char)0x006c,    // Latin Small Letter L With Acute -> l
 0164            (char)0x013b, (char)0x004c,    // Latin Capital Letter L With Cedilla -> L
 0165            (char)0x013c, (char)0x006c,    // Latin Small Letter L With Cedilla -> l
 0166            (char)0x013d, (char)0x004c,    // Latin Capital Letter L With Caron -> L
 0167            (char)0x013e, (char)0x006c,    // Latin Small Letter L With Caron -> l
 0168            (char)0x0141, (char)0x004c,    // Latin Capital Letter L With Stroke -> L
 0169            (char)0x0142, (char)0x006c,    // Latin Small Letter L With Stroke -> l
 0170            (char)0x0143, (char)0x004e,    // Latin Capital Letter N With Acute -> N
 0171            (char)0x0144, (char)0x006e,    // Latin Small Letter N With Acute -> n
 0172            (char)0x0145, (char)0x004e,    // Latin Capital Letter N With Cedilla -> N
 0173            (char)0x0146, (char)0x006e,    // Latin Small Letter N With Cedilla -> n
 0174            (char)0x0147, (char)0x004e,    // Latin Capital Letter N With Caron -> N
 0175            (char)0x0148, (char)0x006e,    // Latin Small Letter N With Caron -> n
 0176            (char)0x014c, (char)0x004f,    // Latin Capital Letter O With Macron -> O
 0177            (char)0x014d, (char)0x006f,    // Latin Small Letter O With Macron -> o
 0178            (char)0x014e, (char)0x004f,    // Latin Capital Letter O With Breve -> O
 0179            (char)0x014f, (char)0x006f,    // Latin Small Letter O With Breve -> o
 0180            (char)0x0150, (char)0x004f,    // Latin Capital Letter O With Double Acute -> O
 0181            (char)0x0151, (char)0x006f,    // Latin Small Letter O With Double Acute -> o
 0182            (char)0x0152, (char)0x004f,    // Latin Capital Ligature Oe -> O
 0183            (char)0x0153, (char)0x006f,    // Latin Small Ligature Oe -> o
 0184            (char)0x0154, (char)0x0052,    // Latin Capital Letter R With Acute -> R
 0185            (char)0x0155, (char)0x0072,    // Latin Small Letter R With Acute -> r
 0186            (char)0x0156, (char)0x0052,    // Latin Capital Letter R With Cedilla -> R
 0187            (char)0x0157, (char)0x0072,    // Latin Small Letter R With Cedilla -> r
 0188            (char)0x0158, (char)0x0052,    // Latin Capital Letter R With Caron -> R
 0189            (char)0x0159, (char)0x0072,    // Latin Small Letter R With Caron -> r
 0190            (char)0x015a, (char)0x0053,    // Latin Capital Letter S With Acute -> S
 0191            (char)0x015b, (char)0x0073,    // Latin Small Letter S With Acute -> s
 0192            (char)0x015c, (char)0x0053,    // Latin Capital Letter S With Circumflex -> S
 0193            (char)0x015d, (char)0x0073,    // Latin Small Letter S With Circumflex -> s
 0194            (char)0x015e, (char)0x0053,    // Latin Capital Letter S With Cedilla -> S
 0195            (char)0x015f, (char)0x0073,    // Latin Small Letter S With Cedilla -> s
 0196            (char)0x0160, (char)0x0053,    // Latin Capital Letter S With Caron -> S
 0197            (char)0x0161, (char)0x0073,    // Latin Small Letter S With Caron -> s
 0198            (char)0x0162, (char)0x0054,    // Latin Capital Letter T With Cedilla -> T
 0199            (char)0x0163, (char)0x0074,    // Latin Small Letter T With Cedilla -> t
 0200            (char)0x0164, (char)0x0054,    // Latin Capital Letter T With Caron -> T
 0201            (char)0x0165, (char)0x0074,    // Latin Small Letter T With Caron -> t
 0202            (char)0x0166, (char)0x0054,    // Latin Capital Letter T With Stroke -> T
 0203            (char)0x0167, (char)0x0074,    // Latin Small Letter T With Stroke -> t
 0204            (char)0x0168, (char)0x0055,    // Latin Capital Letter U With Tilde -> U
 0205            (char)0x0169, (char)0x0075,    // Latin Small Letter U With Tilde -> u
 0206            (char)0x016a, (char)0x0055,    // Latin Capital Letter U With Macron -> U
 0207            (char)0x016b, (char)0x0075,    // Latin Small Letter U With Macron -> u
 0208            (char)0x016c, (char)0x0055,    // Latin Capital Letter U With Breve -> U
 0209            (char)0x016d, (char)0x0075,    // Latin Small Letter U With Breve -> u
 0210            (char)0x016e, (char)0x0055,    // Latin Capital Letter U With Ring Above -> U
 0211            (char)0x016f, (char)0x0075,    // Latin Small Letter U With Ring Above -> u
 0212            (char)0x0170, (char)0x0055,    // Latin Capital Letter U With Double Acute -> U
 0213            (char)0x0171, (char)0x0075,    // Latin Small Letter U With Double Acute -> u
 0214            (char)0x0172, (char)0x0055,    // Latin Capital Letter U With Ogonek -> U
 0215            (char)0x0173, (char)0x0075,    // Latin Small Letter U With Ogonek -> u
 0216            (char)0x0174, (char)0x0057,    // Latin Capital Letter W With Circumflex -> W
 0217            (char)0x0175, (char)0x0077,    // Latin Small Letter W With Circumflex -> w
 0218            (char)0x0176, (char)0x0059,    // Latin Capital Letter Y With Circumflex -> Y
 0219            (char)0x0177, (char)0x0079,    // Latin Small Letter Y With Circumflex -> y
 0220            (char)0x0178, (char)0x0059,    // Latin Capital Letter Y With Diaeresis -> Y
 0221            (char)0x0179, (char)0x005a,    // Latin Capital Letter Z With Acute -> Z
 0222            (char)0x017a, (char)0x007a,    // Latin Small Letter Z With Acute -> z
 0223            (char)0x017b, (char)0x005a,    // Latin Capital Letter Z With Dot Above -> Z
 0224            (char)0x017c, (char)0x007a,    // Latin Small Letter Z With Dot Above -> z
 0225            (char)0x017d, (char)0x005a,    // Latin Capital Letter Z With Caron -> Z
 0226            (char)0x017e, (char)0x007a,    // Latin Small Letter Z With Caron -> z
 0227            (char)0x0180, (char)0x0062,    // Latin Small Letter B With Stroke -> b
 0228            (char)0x0189, (char)0x0044,    // Latin Capital Letter African D -> D
 0229            (char)0x0191, (char)0x0046,    // Latin Capital Letter F With Hook -> F
 0230            (char)0x0192, (char)0x0066,    // Latin Small Letter F With Hook -> f
 0231            (char)0x0197, (char)0x0049,    // Latin Capital Letter I With Stroke -> I
 0232            (char)0x019a, (char)0x006c,    // Latin Small Letter L With Bar -> l
 0233            (char)0x019f, (char)0x004f,    // Latin Capital Letter O With Middle Tilde -> O
 0234            (char)0x01a0, (char)0x004f,    // Latin Capital Letter O With Horn -> O
 0235            (char)0x01a1, (char)0x006f,    // Latin Small Letter O With Horn -> o
 0236            (char)0x01ab, (char)0x0074,    // Latin Small Letter T With Palatal Hook -> t
 0237            (char)0x01ae, (char)0x0054,    // Latin Capital Letter T With Retroflex Hook -> T
 0238            (char)0x01af, (char)0x0055,    // Latin Capital Letter U With Horn -> U
 0239            (char)0x01b0, (char)0x0075,    // Latin Small Letter U With Horn -> u
 0240            (char)0x01b6, (char)0x007a,    // Latin Small Letter Z With Stroke -> z
 0241            (char)0x01cd, (char)0x0041,    // Latin Capital Letter A With Caron -> A
 0242            (char)0x01ce, (char)0x0061,    // Latin Small Letter A With Caron -> a
 0243            (char)0x01cf, (char)0x0049,    // Latin Capital Letter I With Caron -> I
 0244            (char)0x01d0, (char)0x0069,    // Latin Small Letter I With Caron -> i
 0245            (char)0x01d1, (char)0x004f,    // Latin Capital Letter O With Caron -> O
 0246            (char)0x01d2, (char)0x006f,    // Latin Small Letter O With Caron -> o
 0247            (char)0x01d3, (char)0x0055,    // Latin Capital Letter U With Caron -> U
 0248            (char)0x01d4, (char)0x0075,    // Latin Small Letter U With Caron -> u
 0249            (char)0x01d5, (char)0x0055,    // Latin Capital Letter U With Diaeresis And Macron -> U
 0250            (char)0x01d6, (char)0x0075,    // Latin Small Letter U With Diaeresis And Macron -> u
 0251            (char)0x01d7, (char)0x0055,    // Latin Capital Letter U With Diaeresis And Acute -> U
 0252            (char)0x01d8, (char)0x0075,    // Latin Small Letter U With Diaeresis And Acute -> u
 0253            (char)0x01d9, (char)0x0055,    // Latin Capital Letter U With Diaeresis And Caron -> U
 0254            (char)0x01da, (char)0x0075,    // Latin Small Letter U With Diaeresis And Caron -> u
 0255            (char)0x01db, (char)0x0055,    // Latin Capital Letter U With Diaeresis And Grave -> U
 0256            (char)0x01dc, (char)0x0075,    // Latin Small Letter U With Diaeresis And Grave -> u
 0257            (char)0x01de, (char)0x0041,    // Latin Capital Letter A With Diaeresis And Macron -> A
 0258            (char)0x01df, (char)0x0061,    // Latin Small Letter A With Diaeresis And Macron -> a
 0259            (char)0x01e4, (char)0x0047,    // Latin Capital Letter G With Stroke -> G
 0260            (char)0x01e5, (char)0x0067,    // Latin Small Letter G With Stroke -> g
 0261            (char)0x01e6, (char)0x0047,    // Latin Capital Letter G With Caron -> G
 0262            (char)0x01e7, (char)0x0067,    // Latin Small Letter G With Caron -> g
 0263            (char)0x01e8, (char)0x004b,    // Latin Capital Letter K With Caron -> K
 0264            (char)0x01e9, (char)0x006b,    // Latin Small Letter K With Caron -> k
 0265            (char)0x01ea, (char)0x004f,    // Latin Capital Letter O With Ogonek -> O
 0266            (char)0x01eb, (char)0x006f,    // Latin Small Letter O With Ogonek -> o
 0267            (char)0x01ec, (char)0x004f,    // Latin Capital Letter O With Ogonek And Macron -> O
 0268            (char)0x01ed, (char)0x006f,    // Latin Small Letter O With Ogonek And Macron -> o
 0269            (char)0x01f0, (char)0x006a,    // Latin Small Letter J With Caron -> j
 0270            (char)0x0261, (char)0x0067,    // Latin Small Letter Script G -> g
 0271            (char)0x02b9, (char)0x0027,    // Modifier Letter Prime -> '
 0272            (char)0x02ba, (char)0x0022,    // Modifier Letter Double Prime -> "
 0273            (char)0x02bc, (char)0x0027,    // Modifier Letter Apostrophe -> '
 0274            (char)0x02c4, (char)0x005e,    // Modifier Letter Up Arrowhead -> ^
 0275            (char)0x02c6, (char)0x005e,    // Modifier Letter Circumflex Accent -> ^
 0276            (char)0x02c8, (char)0x0027,    // Modifier Letter Vertical Line -> '
 0277            (char)0x02c9, (char)0x003f,    // Modifier Letter Macron
 0278            (char)0x02ca, (char)0x003f,    // Modifier Letter Acute Accent
 0279            (char)0x02cb, (char)0x0060,    // Modifier Letter Grave Accent -> `
 0280            (char)0x02cd, (char)0x005f,    // Modifier Letter Low Macron -> _
 0281            (char)0x02da, (char)0x003f,    // Ring Above
 0282            (char)0x02dc, (char)0x007e,    // Small Tilde -> ~
 0283            (char)0x0300, (char)0x0060,    // Combining Grave Accent -> `
 0284            (char)0x0302, (char)0x005e,    // Combining Circumflex Accent -> ^
 0285            (char)0x0303, (char)0x007e,    // Combining Tilde -> ~
 0286            (char)0x030e, (char)0x0022,    // Combining Double Vertical Line Above -> "
 0287            (char)0x0331, (char)0x005f,    // Combining Macron Below -> _
 0288            (char)0x0332, (char)0x005f,    // Combining Low Line -> _
 0289            (char)0x2000, (char)0x0020,    // En Quad
 0290            (char)0x2001, (char)0x0020,    // Em Quad
 0291            (char)0x2002, (char)0x0020,    // En Space
 0292            (char)0x2003, (char)0x0020,    // Em Space
 0293            (char)0x2004, (char)0x0020,    // Three-Per-Em Space
 0294            (char)0x2005, (char)0x0020,    // Four-Per-Em Space
 0295            (char)0x2006, (char)0x0020,    // Six-Per-Em Space
 0296            (char)0x2010, (char)0x002d,    // Hyphen -> -
 0297            (char)0x2011, (char)0x002d,    // Non-Breaking Hyphen -> -
 0298            (char)0x2013, (char)0x002d,    // En Dash -> -
 0299            (char)0x2014, (char)0x002d,    // Em Dash -> -
 0300            (char)0x2018, (char)0x0027,    // Left Single Quotation Mark -> '
 0301            (char)0x2019, (char)0x0027,    // Right Single Quotation Mark -> '
 0302            (char)0x201a, (char)0x002c,    // Single Low-9 Quotation Mark -> ,
 0303            (char)0x201c, (char)0x0022,    // Left Double Quotation Mark -> "
 0304            (char)0x201d, (char)0x0022,    // Right Double Quotation Mark -> "
 0305            (char)0x201e, (char)0x0022,    // Double Low-9 Quotation Mark -> "
 0306            (char)0x2020, (char)0x003f,    // Dagger
 0307            (char)0x2021, (char)0x003f,    // Double Dagger
 0308            (char)0x2022, (char)0x002e,    // Bullet -> .
 0309            (char)0x2026, (char)0x002e,    // Horizontal Ellipsis -> .
 0310            (char)0x2030, (char)0x003f,    // Per Mille Sign
 0311            (char)0x2032, (char)0x0027,    // Prime -> '
 0312            (char)0x2035, (char)0x0060,    // Reversed Prime -> `
 0313            (char)0x2039, (char)0x003c,    // Single Left-Pointing Angle Quotation Mark -> <
 0314            (char)0x203a, (char)0x003e,    // Single Right-Pointing Angle Quotation Mark -> >
 0315            (char)0x2122, (char)0x0054,    // Trade Mark Sign -> T
 0316            (char)0xff01, (char)0x0021,    // Fullwidth Exclamation Mark -> !
 0317            (char)0xff02, (char)0x0022,    // Fullwidth Quotation Mark -> "
 0318            (char)0xff03, (char)0x0023,    // Fullwidth Number Sign -> #
 0319            (char)0xff04, (char)0x0024,    // Fullwidth Dollar Sign -> $
 0320            (char)0xff05, (char)0x0025,    // Fullwidth Percent Sign -> %
 0321            (char)0xff06, (char)0x0026,    // Fullwidth Ampersand -> &
 0322            (char)0xff07, (char)0x0027,    // Fullwidth Apostrophe -> '
 0323            (char)0xff08, (char)0x0028,    // Fullwidth Left Parenthesis -> (
 0324            (char)0xff09, (char)0x0029,    // Fullwidth Right Parenthesis -> )
 0325            (char)0xff0a, (char)0x002a,    // Fullwidth Asterisk -> *
 0326            (char)0xff0b, (char)0x002b,    // Fullwidth Plus Sign -> +
 0327            (char)0xff0c, (char)0x002c,    // Fullwidth Comma -> ,
 0328            (char)0xff0d, (char)0x002d,    // Fullwidth Hyphen-Minus -> -
 0329            (char)0xff0e, (char)0x002e,    // Fullwidth Full Stop -> .
 0330            (char)0xff0f, (char)0x002f,    // Fullwidth Solidus -> /
 0331            (char)0xff10, (char)0x0030,    // Fullwidth Digit Zero -> 0
 0332            (char)0xff11, (char)0x0031,    // Fullwidth Digit One -> 1
 0333            (char)0xff12, (char)0x0032,    // Fullwidth Digit Two -> 2
 0334            (char)0xff13, (char)0x0033,    // Fullwidth Digit Three -> 3
 0335            (char)0xff14, (char)0x0034,    // Fullwidth Digit Four -> 4
 0336            (char)0xff15, (char)0x0035,    // Fullwidth Digit Five -> 5
 0337            (char)0xff16, (char)0x0036,    // Fullwidth Digit Six -> 6
 0338            (char)0xff17, (char)0x0037,    // Fullwidth Digit Seven -> 7
 0339            (char)0xff18, (char)0x0038,    // Fullwidth Digit Eight -> 8
 0340            (char)0xff19, (char)0x0039,    // Fullwidth Digit Nine -> 9
 0341            (char)0xff1a, (char)0x003a,    // Fullwidth Colon -> :
 0342            (char)0xff1b, (char)0x003b,    // Fullwidth Semicolon -> ;
 0343            (char)0xff1c, (char)0x003c,    // Fullwidth Less-Than Sign -> <
 0344            (char)0xff1d, (char)0x003d,    // Fullwidth Equals Sign -> =
 0345            (char)0xff1e, (char)0x003e,    // Fullwidth Greater-Than Sign -> >
 0346            (char)0xff1f, (char)0x003f,    // Fullwidth Question Mark
 0347            (char)0xff20, (char)0x0040,    // Fullwidth Commercial At -> @
 0348            (char)0xff21, (char)0x0041,    // Fullwidth Latin Capital Letter A -> A
 0349            (char)0xff22, (char)0x0042,    // Fullwidth Latin Capital Letter B -> B
 0350            (char)0xff23, (char)0x0043,    // Fullwidth Latin Capital Letter C -> C
 0351            (char)0xff24, (char)0x0044,    // Fullwidth Latin Capital Letter D -> D
 0352            (char)0xff25, (char)0x0045,    // Fullwidth Latin Capital Letter E -> E
 0353            (char)0xff26, (char)0x0046,    // Fullwidth Latin Capital Letter F -> F
 0354            (char)0xff27, (char)0x0047,    // Fullwidth Latin Capital Letter G -> G
 0355            (char)0xff28, (char)0x0048,    // Fullwidth Latin Capital Letter H -> H
 0356            (char)0xff29, (char)0x0049,    // Fullwidth Latin Capital Letter I -> I
 0357            (char)0xff2a, (char)0x004a,    // Fullwidth Latin Capital Letter J -> J
 0358            (char)0xff2b, (char)0x004b,    // Fullwidth Latin Capital Letter K -> K
 0359            (char)0xff2c, (char)0x004c,    // Fullwidth Latin Capital Letter L -> L
 0360            (char)0xff2d, (char)0x004d,    // Fullwidth Latin Capital Letter M -> M
 0361            (char)0xff2e, (char)0x004e,    // Fullwidth Latin Capital Letter N -> N
 0362            (char)0xff2f, (char)0x004f,    // Fullwidth Latin Capital Letter O -> O
 0363            (char)0xff30, (char)0x0050,    // Fullwidth Latin Capital Letter P -> P
 0364            (char)0xff31, (char)0x0051,    // Fullwidth Latin Capital Letter Q -> Q
 0365            (char)0xff32, (char)0x0052,    // Fullwidth Latin Capital Letter R -> R
 0366            (char)0xff33, (char)0x0053,    // Fullwidth Latin Capital Letter S -> S
 0367            (char)0xff34, (char)0x0054,    // Fullwidth Latin Capital Letter T -> T
 0368            (char)0xff35, (char)0x0055,    // Fullwidth Latin Capital Letter U -> U
 0369            (char)0xff36, (char)0x0056,    // Fullwidth Latin Capital Letter V -> V
 0370            (char)0xff37, (char)0x0057,    // Fullwidth Latin Capital Letter W -> W
 0371            (char)0xff38, (char)0x0058,    // Fullwidth Latin Capital Letter X -> X
 0372            (char)0xff39, (char)0x0059,    // Fullwidth Latin Capital Letter Y -> Y
 0373            (char)0xff3a, (char)0x005a,    // Fullwidth Latin Capital Letter Z -> Z
 0374            (char)0xff3b, (char)0x005b,    // Fullwidth Left Square Bracket -> [
 0375            (char)0xff3c, (char)0x005c,    // Fullwidth Reverse Solidus -> \
 0376            (char)0xff3d, (char)0x005d,    // Fullwidth Right Square Bracket -> ]
 0377            (char)0xff3e, (char)0x005e,    // Fullwidth Circumflex Accent -> ^
 0378            (char)0xff3f, (char)0x005f,    // Fullwidth Low Line -> _
 0379            (char)0xff40, (char)0x0060,    // Fullwidth Grave Accent -> `
 0380            (char)0xff41, (char)0x0061,    // Fullwidth Latin Small Letter A -> a
 0381            (char)0xff42, (char)0x0062,    // Fullwidth Latin Small Letter B -> b
 0382            (char)0xff43, (char)0x0063,    // Fullwidth Latin Small Letter C -> c
 0383            (char)0xff44, (char)0x0064,    // Fullwidth Latin Small Letter D -> d
 0384            (char)0xff45, (char)0x0065,    // Fullwidth Latin Small Letter E -> e
 0385            (char)0xff46, (char)0x0066,    // Fullwidth Latin Small Letter F -> f
 0386            (char)0xff47, (char)0x0067,    // Fullwidth Latin Small Letter G -> g
 0387            (char)0xff48, (char)0x0068,    // Fullwidth Latin Small Letter H -> h
 0388            (char)0xff49, (char)0x0069,    // Fullwidth Latin Small Letter I -> i
 0389            (char)0xff4a, (char)0x006a,    // Fullwidth Latin Small Letter J -> j
 0390            (char)0xff4b, (char)0x006b,    // Fullwidth Latin Small Letter K -> k
 0391            (char)0xff4c, (char)0x006c,    // Fullwidth Latin Small Letter L -> l
 0392            (char)0xff4d, (char)0x006d,    // Fullwidth Latin Small Letter M -> m
 0393            (char)0xff4e, (char)0x006e,    // Fullwidth Latin Small Letter N -> n
 0394            (char)0xff4f, (char)0x006f,    // Fullwidth Latin Small Letter O -> o
 0395            (char)0xff50, (char)0x0070,    // Fullwidth Latin Small Letter P -> p
 0396            (char)0xff51, (char)0x0071,    // Fullwidth Latin Small Letter Q -> q
 0397            (char)0xff52, (char)0x0072,    // Fullwidth Latin Small Letter R -> r
 0398            (char)0xff53, (char)0x0073,    // Fullwidth Latin Small Letter S -> s
 0399            (char)0xff54, (char)0x0074,    // Fullwidth Latin Small Letter T -> t
 0400            (char)0xff55, (char)0x0075,    // Fullwidth Latin Small Letter U -> u
 0401            (char)0xff56, (char)0x0076,    // Fullwidth Latin Small Letter V -> v
 0402            (char)0xff57, (char)0x0077,    // Fullwidth Latin Small Letter W -> w
 0403            (char)0xff58, (char)0x0078,    // Fullwidth Latin Small Letter X -> x
 0404            (char)0xff59, (char)0x0079,    // Fullwidth Latin Small Letter Y -> y
 0405            (char)0xff5a, (char)0x007a,    // Fullwidth Latin Small Letter Z -> z
 0406            (char)0xff5b, (char)0x007b,    // Fullwidth Left Curly Bracket -> {
 0407            (char)0xff5c, (char)0x007c,    // Fullwidth Vertical Line -> |
 0408            (char)0xff5d, (char)0x007d,    // Fullwidth Right Curly Bracket -> }
 0409            (char)0xff5e, (char)0x007e     // Fullwidth Tilde -> ~
 0410        ];
 411    }
 412}
 413