1 // Copyright 2014 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef BASE_I18N_UTF8_VALIDATOR_TABLES_H_ 6 #define BASE_I18N_UTF8_VALIDATOR_TABLES_H_ 7 8 #include <stddef.h> 9 #include <stdint.h> 10 11 12 namespace base { 13 namespace internal { 14 15 // The tables for all states; a list of entries of the form (right_shift, 16 // next_state, next_state, ....). The right_shifts are used to reduce the 17 // overall size of the table. The table only covers bytes in the range 18 // [0x80, 0xFF] to save space. 19 extern const uint8_t kUtf8ValidatorTables[]; 20 21 extern const size_t kUtf8ValidatorTablesSize; 22 23 // The offset of the INVALID state in kUtf8ValidatorTables. 24 enum { 25 I18N_UTF8_VALIDATOR_INVALID_INDEX = 129 26 }; 27 28 } // namespace internal 29 } // namespace base 30 31 #endif // BASE_I18N_UTF8_VALIDATOR_TABLES_H_ 32