| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/character_encoding.h" | 5 #include "chrome/browser/character_encoding.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 { IDC_ENCODING_MACINTOSH, L"macintosh", IDS_ENCODING_WESTERN }, | 46 { IDC_ENCODING_MACINTOSH, L"macintosh", IDS_ENCODING_WESTERN }, |
| 47 { IDC_ENCODING_ISO88592, L"ISO-8859-2", IDS_ENCODING_CENTRAL_EUROPEAN }, | 47 { IDC_ENCODING_ISO88592, L"ISO-8859-2", IDS_ENCODING_CENTRAL_EUROPEAN }, |
| 48 { IDC_ENCODING_WINDOWS1250, L"windows-1250", IDS_ENCODING_CENTRAL_EUROPEAN }, | 48 { IDC_ENCODING_WINDOWS1250, L"windows-1250", IDS_ENCODING_CENTRAL_EUROPEAN }, |
| 49 { IDC_ENCODING_ISO88595, L"ISO-8859-5", IDS_ENCODING_CYRILLIC }, | 49 { IDC_ENCODING_ISO88595, L"ISO-8859-5", IDS_ENCODING_CYRILLIC }, |
| 50 { IDC_ENCODING_WINDOWS1251, L"windows-1251", IDS_ENCODING_CYRILLIC }, | 50 { IDC_ENCODING_WINDOWS1251, L"windows-1251", IDS_ENCODING_CYRILLIC }, |
| 51 { IDC_ENCODING_KOI8R, L"KOI8-R", IDS_ENCODING_CYRILLIC }, | 51 { IDC_ENCODING_KOI8R, L"KOI8-R", IDS_ENCODING_CYRILLIC }, |
| 52 { IDC_ENCODING_KOI8U, L"KOI8-U", IDS_ENCODING_CYRILLIC }, | 52 { IDC_ENCODING_KOI8U, L"KOI8-U", IDS_ENCODING_CYRILLIC }, |
| 53 { IDC_ENCODING_ISO88597, L"ISO-8859-7", IDS_ENCODING_GREEK }, | 53 { IDC_ENCODING_ISO88597, L"ISO-8859-7", IDS_ENCODING_GREEK }, |
| 54 { IDC_ENCODING_WINDOWS1253, L"windows-1253", IDS_ENCODING_GREEK }, | 54 { IDC_ENCODING_WINDOWS1253, L"windows-1253", IDS_ENCODING_GREEK }, |
| 55 { IDC_ENCODING_WINDOWS1254, L"windows-1254", IDS_ENCODING_TURKISH }, | 55 { IDC_ENCODING_WINDOWS1254, L"windows-1254", IDS_ENCODING_TURKISH }, |
| 56 { IDC_ENCODING_WINDOWS1256, L"windows-1256", IDS_ENCODING_ARABIC }, |
| 56 { IDC_ENCODING_ISO88596, L"ISO-8859-6", IDS_ENCODING_ARABIC }, | 57 { IDC_ENCODING_ISO88596, L"ISO-8859-6", IDS_ENCODING_ARABIC }, |
| 57 { IDC_ENCODING_WINDOWS1256, L"windows-1256", IDS_ENCODING_ARABIC }, | 58 { IDC_ENCODING_WINDOWS1255, L"windows-1255", IDS_ENCODING_HEBREW }, |
| 59 { IDC_ENCODING_ISO88598I, L"ISO-8859-8-I", IDS_ENCODING_HEBREW }, |
| 58 { IDC_ENCODING_ISO88598, L"ISO-8859-8", IDS_ENCODING_HEBREW }, | 60 { IDC_ENCODING_ISO88598, L"ISO-8859-8", IDS_ENCODING_HEBREW }, |
| 59 { IDC_ENCODING_WINDOWS1255, L"windows-1255", IDS_ENCODING_HEBREW }, | |
| 60 { IDC_ENCODING_WINDOWS1258, L"windows-1258", IDS_ENCODING_VIETNAMESE }, | 61 { IDC_ENCODING_WINDOWS1258, L"windows-1258", IDS_ENCODING_VIETNAMESE }, |
| 61 { IDC_ENCODING_ISO88594, L"ISO-8859-4", IDS_ENCODING_BALTIC }, | 62 { IDC_ENCODING_ISO88594, L"ISO-8859-4", IDS_ENCODING_BALTIC }, |
| 62 { IDC_ENCODING_ISO885913, L"ISO-8859-13", IDS_ENCODING_BALTIC }, | 63 { IDC_ENCODING_ISO885913, L"ISO-8859-13", IDS_ENCODING_BALTIC }, |
| 63 { IDC_ENCODING_WINDOWS1257, L"windows-1257", IDS_ENCODING_BALTIC }, | 64 { IDC_ENCODING_WINDOWS1257, L"windows-1257", IDS_ENCODING_BALTIC }, |
| 64 { IDC_ENCODING_ISO88593, L"ISO-8859-3", IDS_ENCODING_SOUTH_EUROPEAN }, | 65 { IDC_ENCODING_ISO88593, L"ISO-8859-3", IDS_ENCODING_SOUTH_EUROPEAN }, |
| 65 { IDC_ENCODING_ISO885910, L"ISO-8859-10", IDS_ENCODING_NORDIC }, | 66 { IDC_ENCODING_ISO885910, L"ISO-8859-10", IDS_ENCODING_NORDIC }, |
| 66 { IDC_ENCODING_ISO885914, L"ISO-8859-14", IDS_ENCODING_CELTIC }, | 67 { IDC_ENCODING_ISO885914, L"ISO-8859-14", IDS_ENCODING_CELTIC }, |
| 67 { IDC_ENCODING_ISO885916, L"ISO-8859-16", IDS_ENCODING_ROMANIAN }, | 68 { IDC_ENCODING_ISO885916, L"ISO-8859-16", IDS_ENCODING_ROMANIAN }, |
| 68 }; | 69 }; |
| 69 | 70 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 IDC_ENCODING_MACINTOSH, | 147 IDC_ENCODING_MACINTOSH, |
| 147 IDC_ENCODING_ISO88592, | 148 IDC_ENCODING_ISO88592, |
| 148 IDC_ENCODING_WINDOWS1250, | 149 IDC_ENCODING_WINDOWS1250, |
| 149 IDC_ENCODING_ISO88595, | 150 IDC_ENCODING_ISO88595, |
| 150 IDC_ENCODING_WINDOWS1251, | 151 IDC_ENCODING_WINDOWS1251, |
| 151 IDC_ENCODING_KOI8R, | 152 IDC_ENCODING_KOI8R, |
| 152 IDC_ENCODING_KOI8U, | 153 IDC_ENCODING_KOI8U, |
| 153 IDC_ENCODING_ISO88597, | 154 IDC_ENCODING_ISO88597, |
| 154 IDC_ENCODING_WINDOWS1253, | 155 IDC_ENCODING_WINDOWS1253, |
| 155 IDC_ENCODING_WINDOWS1254, | 156 IDC_ENCODING_WINDOWS1254, |
| 157 IDC_ENCODING_WINDOWS1256, |
| 156 IDC_ENCODING_ISO88596, | 158 IDC_ENCODING_ISO88596, |
| 157 IDC_ENCODING_WINDOWS1256, | 159 IDC_ENCODING_WINDOWS1255, |
| 160 IDC_ENCODING_ISO88598I, |
| 158 IDC_ENCODING_ISO88598, | 161 IDC_ENCODING_ISO88598, |
| 159 IDC_ENCODING_WINDOWS1255, | |
| 160 IDC_ENCODING_WINDOWS1258, | 162 IDC_ENCODING_WINDOWS1258, |
| 161 IDC_ENCODING_ISO88594, | 163 IDC_ENCODING_ISO88594, |
| 162 IDC_ENCODING_ISO885913, | 164 IDC_ENCODING_ISO885913, |
| 163 IDC_ENCODING_WINDOWS1257, | 165 IDC_ENCODING_WINDOWS1257, |
| 164 IDC_ENCODING_ISO88593, | 166 IDC_ENCODING_ISO88593, |
| 165 IDC_ENCODING_ISO885910, | 167 IDC_ENCODING_ISO885910, |
| 166 IDC_ENCODING_ISO885914, | 168 IDC_ENCODING_ISO885914, |
| 167 IDC_ENCODING_ISO885916, | 169 IDC_ENCODING_ISO885916, |
| 168 }; | 170 }; |
| 169 | 171 |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 // Insert new encoding to head of selected encoding list. | 462 // Insert new encoding to head of selected encoding list. |
| 461 *selected_encodings = encoding_name; | 463 *selected_encodings = encoding_name; |
| 462 // Generate the string for rest selected encoding list. | 464 // Generate the string for rest selected encoding list. |
| 463 for (std::vector<int>::const_iterator it = selected_encoding_list.begin(); | 465 for (std::vector<int>::const_iterator it = selected_encoding_list.begin(); |
| 464 it != selected_encoding_list.end(); ++it) { | 466 it != selected_encoding_list.end(); ++it) { |
| 465 selected_encodings->append(1, L','); | 467 selected_encodings->append(1, L','); |
| 466 selected_encodings->append(GetCanonicalEncodingNameByCommandId(*it)); | 468 selected_encodings->append(GetCanonicalEncodingNameByCommandId(*it)); |
| 467 } | 469 } |
| 468 return true; | 470 return true; |
| 469 } | 471 } |
| OLD | NEW |