| 159 | |
| 160 | public: |
| 161 | inline TCodePageHash() |
| 162 | : Pool(20 * 1024) /* Currently used: 17KB. */ |
| 163 | { |
| 164 | TString xPrefix = "x-"; |
| 165 | const char* name; |
| 166 | |
| 167 | for (size_t i = 0; i != CODES_MAX; ++i) { |
| 168 | ECharset e = static_cast<ECharset>(i); |
| 169 | const CodePage* page = Singleton<NCodepagePrivate::TCodepagesMap>()->GetPrivate(e); |
| 170 | |
| 171 | AddName(ToString(static_cast<int>(i)), e); |
| 172 | |
| 173 | for (size_t j = 0; (name = page->Names[j]) != nullptr && name[0]; ++j) { |
| 174 | AddName(name, e); |
| 175 | |
| 176 | AddName(xPrefix + name, e); |
| 177 | } |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | inline ECharset CharsetByName(TStringBuf name) { |
| 182 | if (!name) |
nothing calls this directly
no test coverage detected