| OLD | NEW |
| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 registrar("iso_8859-1:1987", "windows-1252"); | 86 registrar("iso_8859-1:1987", "windows-1252"); |
| 87 registrar("l1", "windows-1252"); | 87 registrar("l1", "windows-1252"); |
| 88 registrar("latin1", "windows-1252"); | 88 registrar("latin1", "windows-1252"); |
| 89 registrar("US-ASCII", "windows-1252"); | 89 registrar("US-ASCII", "windows-1252"); |
| 90 registrar("x-cp1252", "windows-1252"); | 90 registrar("x-cp1252", "windows-1252"); |
| 91 } | 91 } |
| 92 | 92 |
| 93 static std::unique_ptr<TextCodec> newStreamingTextDecoderWindowsLatin1( | 93 static std::unique_ptr<TextCodec> newStreamingTextDecoderWindowsLatin1( |
| 94 const TextEncoding&, | 94 const TextEncoding&, |
| 95 const void*) { | 95 const void*) { |
| 96 return wrapUnique(new TextCodecLatin1); | 96 return WTF::wrapUnique(new TextCodecLatin1); |
| 97 } | 97 } |
| 98 | 98 |
| 99 void TextCodecLatin1::registerCodecs(TextCodecRegistrar registrar) { | 99 void TextCodecLatin1::registerCodecs(TextCodecRegistrar registrar) { |
| 100 registrar("windows-1252", newStreamingTextDecoderWindowsLatin1, 0); | 100 registrar("windows-1252", newStreamingTextDecoderWindowsLatin1, 0); |
| 101 | 101 |
| 102 // ASCII and Latin-1 both decode as Windows Latin-1 although they retain | 102 // ASCII and Latin-1 both decode as Windows Latin-1 although they retain |
| 103 // unique identities. | 103 // unique identities. |
| 104 registrar("ISO-8859-1", newStreamingTextDecoderWindowsLatin1, 0); | 104 registrar("ISO-8859-1", newStreamingTextDecoderWindowsLatin1, 0); |
| 105 registrar("US-ASCII", newStreamingTextDecoderWindowsLatin1, 0); | 105 registrar("US-ASCII", newStreamingTextDecoderWindowsLatin1, 0); |
| 106 } | 106 } |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 return encodeCommon(characters, length, handling); | 284 return encodeCommon(characters, length, handling); |
| 285 } | 285 } |
| 286 | 286 |
| 287 CString TextCodecLatin1::encode(const LChar* characters, | 287 CString TextCodecLatin1::encode(const LChar* characters, |
| 288 size_t length, | 288 size_t length, |
| 289 UnencodableHandling handling) { | 289 UnencodableHandling handling) { |
| 290 return encodeCommon(characters, length, handling); | 290 return encodeCommon(characters, length, handling); |
| 291 } | 291 } |
| 292 | 292 |
| 293 } // namespace WTF | 293 } // namespace WTF |
| OLD | NEW |