Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: Source/wtf/text/TextCodecLatin1.cpp

Issue 655083002: Update the tests (ISO-8859-1 => windows-1252) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: two more rep. of iso-8859-1 with windows-1252 Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/wtf/text/TextCodecICU.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, // D0-D7 66 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, // D0-D7
67 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF, // D8-DF 67 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF, // D8-DF
68 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, // E0-E7 68 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, // E0-E7
69 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, // E8-EF 69 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, // E8-EF
70 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, // F0-F7 70 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, // F0-F7
71 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF // F8-FF 71 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF // F8-FF
72 }; 72 };
73 73
74 void TextCodecLatin1::registerEncodingNames(EncodingNameRegistrar registrar) 74 void TextCodecLatin1::registerEncodingNames(EncodingNameRegistrar registrar)
75 { 75 {
76 // Taken from the alias table at https://encoding.spec.whatwg.org/
76 registrar("windows-1252", "windows-1252"); 77 registrar("windows-1252", "windows-1252");
77 registrar("ISO-8859-1", "ISO-8859-1"); 78 registrar("ANSI_X3.4-1968", "windows-1252");
78 registrar("US-ASCII", "US-ASCII"); 79 registrar("ASCII", "windows-1252");
79 80 registrar("cp1252", "windows-1252");
80 registrar("WinLatin1", "windows-1252"); 81 registrar("cp819", "windows-1252");
81 registrar("ibm-1252", "windows-1252"); 82 registrar("csISOLatin1", "windows-1252");
82 registrar("ibm-1252_P100-2000", "windows-1252"); 83 registrar("IBM819", "windows-1252");
83 84 registrar("ISO-8859-1", "windows-1252");
84 registrar("CP819", "ISO-8859-1"); 85 registrar("iso-ir-100", "windows-1252");
85 registrar("IBM819", "ISO-8859-1"); 86 registrar("iso8859-1", "windows-1252");
86 registrar("csISOLatin1", "ISO-8859-1"); 87 registrar("iso88591", "windows-1252");
87 registrar("iso-ir-100", "ISO-8859-1"); 88 registrar("iso_8859-1", "windows-1252");
88 registrar("iso_8859-1:1987", "ISO-8859-1"); 89 registrar("iso_8859-1:1987", "windows-1252");
89 registrar("l1", "ISO-8859-1"); 90 registrar("l1", "windows-1252");
90 registrar("latin1", "ISO-8859-1"); 91 registrar("latin1", "windows-1252");
91 92 registrar("US-ASCII", "windows-1252");
92 registrar("ANSI_X3.4-1968", "US-ASCII"); 93 registrar("x-cp1252", "windows-1252");
93 registrar("ANSI_X3.4-1986", "US-ASCII");
94 registrar("ASCII", "US-ASCII");
95 registrar("IBM367", "US-ASCII");
96 registrar("ISO646-US", "US-ASCII");
97 registrar("ISO_646.irv:1991", "US-ASCII");
98 registrar("cp367", "US-ASCII");
99 registrar("csASCII", "US-ASCII");
100 registrar("ibm-367_P100-1995", "US-ASCII");
101 registrar("iso-ir-6", "US-ASCII");
102 registrar("iso-ir-6-us", "US-ASCII");
103 registrar("us", "US-ASCII");
104 registrar("x-ansi", "US-ASCII");
105 } 94 }
106 95
107 static PassOwnPtr<TextCodec> newStreamingTextDecoderWindowsLatin1(const TextEnco ding&, const void*) 96 static PassOwnPtr<TextCodec> newStreamingTextDecoderWindowsLatin1(const TextEnco ding&, const void*)
108 { 97 {
109 return adoptPtr(new TextCodecLatin1); 98 return adoptPtr(new TextCodecLatin1);
110 } 99 }
111 100
112 void TextCodecLatin1::registerCodecs(TextCodecRegistrar registrar) 101 void TextCodecLatin1::registerCodecs(TextCodecRegistrar registrar)
113 { 102 {
114 registrar("windows-1252", newStreamingTextDecoderWindowsLatin1, 0); 103 registrar("windows-1252", newStreamingTextDecoderWindowsLatin1, 0);
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 { 261 {
273 return encodeCommon(characters, length, handling); 262 return encodeCommon(characters, length, handling);
274 } 263 }
275 264
276 CString TextCodecLatin1::encode(const LChar* characters, size_t length, Unencoda bleHandling handling) 265 CString TextCodecLatin1::encode(const LChar* characters, size_t length, Unencoda bleHandling handling)
277 { 266 {
278 return encodeCommon(characters, length, handling); 267 return encodeCommon(characters, length, handling);
279 } 268 }
280 269
281 } // namespace WTF 270 } // namespace WTF
OLDNEW
« no previous file with comments | « Source/wtf/text/TextCodecICU.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698