| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2006 Alexey Proskuryakov <ap@nypop.com> | 3 * Copyright (C) 2006 Alexey Proskuryakov <ap@nypop.com> |
| 4 * Copyright (C) 2007-2009 Torch Mobile, Inc. | 4 * Copyright (C) 2007-2009 Torch Mobile, Inc. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #include "config.h" | 28 #include "config.h" |
| 29 #include "wtf/text/TextEncoding.h" | 29 #include "wtf/text/TextEncoding.h" |
| 30 | 30 |
| 31 #include "wtf/text/TextEncodingRegistry.h" | |
| 32 #include <unicode/unorm.h> | |
| 33 #include "wtf/OwnPtr.h" | 31 #include "wtf/OwnPtr.h" |
| 34 #include "wtf/StdLibExtras.h" | 32 #include "wtf/StdLibExtras.h" |
| 35 #include "wtf/Threading.h" | 33 #include "wtf/Threading.h" |
| 36 #include "wtf/text/CString.h" | 34 #include "wtf/text/CString.h" |
| 35 #include "wtf/text/TextEncodingRegistry.h" |
| 37 #include "wtf/text/WTFString.h" | 36 #include "wtf/text/WTFString.h" |
| 37 #include <unicode/unorm.h> |
| 38 | 38 |
| 39 namespace WTF { | 39 namespace WTF { |
| 40 | 40 |
| 41 static const TextEncoding& UTF7Encoding() | 41 static const TextEncoding& UTF7Encoding() |
| 42 { | 42 { |
| 43 AtomicallyInitializedStaticReference(const TextEncoding, globalUTF7Encoding,
new TextEncoding("UTF-7")); | 43 AtomicallyInitializedStaticReference(const TextEncoding, globalUTF7Encoding,
new TextEncoding("UTF-7")); |
| 44 return globalUTF7Encoding; | 44 return globalUTF7Encoding; |
| 45 } | 45 } |
| 46 | 46 |
| 47 TextEncoding::TextEncoding(const char* name) | 47 TextEncoding::TextEncoding(const char* name) |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 return globalUTF8Encoding; | 216 return globalUTF8Encoding; |
| 217 } | 217 } |
| 218 | 218 |
| 219 const TextEncoding& WindowsLatin1Encoding() | 219 const TextEncoding& WindowsLatin1Encoding() |
| 220 { | 220 { |
| 221 AtomicallyInitializedStaticReference(const TextEncoding, globalWindowsLatin1
Encoding, new TextEncoding("WinLatin1")); | 221 AtomicallyInitializedStaticReference(const TextEncoding, globalWindowsLatin1
Encoding, new TextEncoding("WinLatin1")); |
| 222 return globalWindowsLatin1Encoding; | 222 return globalWindowsLatin1Encoding; |
| 223 } | 223 } |
| 224 | 224 |
| 225 } // namespace WTF | 225 } // namespace WTF |
| OLD | NEW |