| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. |
| 3 * Copyright (C) 2006 Alexey Proskuryakov <ap@nypop.com> | 3 * Copyright (C) 2006 Alexey Proskuryakov <ap@nypop.com> |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "wtf/Noncopyable.h" | 32 #include "wtf/Noncopyable.h" |
| 33 #include "wtf/PassOwnPtr.h" | 33 #include "wtf/PassOwnPtr.h" |
| 34 #include "wtf/Vector.h" | 34 #include "wtf/Vector.h" |
| 35 #include "wtf/text/WTFString.h" | 35 #include "wtf/text/WTFString.h" |
| 36 #include "wtf/unicode/Unicode.h" | 36 #include "wtf/unicode/Unicode.h" |
| 37 | 37 |
| 38 namespace WTF { | 38 namespace WTF { |
| 39 | 39 |
| 40 class TextEncoding; | 40 class TextEncoding; |
| 41 | 41 |
| 42 // Which normalization algorithm to apply. |
| 43 enum NormalizationMode { |
| 44 // No normalization is performed. |
| 45 NoNormalization, |
| 46 |
| 47 // Apply Unicode NFC normalization. |
| 48 NFCNormalization |
| 49 }; |
| 50 |
| 42 // Specifies what will happen when a character is encountered that is | 51 // Specifies what will happen when a character is encountered that is |
| 43 // not encodable in the character set. | 52 // not encodable in the character set. |
| 44 enum UnencodableHandling { | 53 enum UnencodableHandling { |
| 45 // Substitutes the replacement character "?". | 54 // Substitutes the replacement character "?". |
| 46 QuestionMarksForUnencodables, | 55 QuestionMarksForUnencodables, |
| 47 | 56 |
| 48 // Encodes the character as an XML entity. For example, U+06DE | 57 // Encodes the character as an XML entity. For example, U+06DE |
| 49 // would be "۞" (0x6DE = 1758 in octal). | 58 // would be "۞" (0x6DE = 1758 in octal). |
| 50 EntitiesForUnencodables, | 59 EntitiesForUnencodables, |
| 51 | 60 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 82 typedef void (*EncodingNameRegistrar)(const char* alias, const char* name); | 91 typedef void (*EncodingNameRegistrar)(const char* alias, const char* name); |
| 83 | 92 |
| 84 typedef PassOwnPtr<TextCodec> (*NewTextCodecFunction)(const TextEncoding&, const
void* additionalData); | 93 typedef PassOwnPtr<TextCodec> (*NewTextCodecFunction)(const TextEncoding&, const
void* additionalData); |
| 85 typedef void (*TextCodecRegistrar)(const char* name, NewTextCodecFunction, const
void* additionalData); | 94 typedef void (*TextCodecRegistrar)(const char* name, NewTextCodecFunction, const
void* additionalData); |
| 86 | 95 |
| 87 } // namespace WTF | 96 } // namespace WTF |
| 88 | 97 |
| 89 using WTF::TextCodec; | 98 using WTF::TextCodec; |
| 90 | 99 |
| 91 #endif // TextCodec_h | 100 #endif // TextCodec_h |
| OLD | NEW |