aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/charset
diff options
context:
space:
mode:
authoraosipenko <aosipenko@yandex-team.ru>2022-02-10 16:48:08 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:08 +0300
commit69e3c43df1c96bc2ac8946bf4dfb1f5fc438ff7f (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/charset
parent948fd24d47d4b3b7815aaef1686aea00ef3f4288 (diff)
downloadydb-69e3c43df1c96bc2ac8946bf4dfb1f5fc438ff7f.tar.gz
Restoring authorship annotation for <aosipenko@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/charset')
-rw-r--r--library/cpp/charset/codepage.cpp8
-rw-r--r--library/cpp/charset/codepage_ut.cpp18
-rw-r--r--library/cpp/charset/generated/encrec_data.cpp100
-rw-r--r--library/cpp/charset/wide_ut.cpp82
4 files changed, 104 insertions, 104 deletions
diff --git a/library/cpp/charset/codepage.cpp b/library/cpp/charset/codepage.cpp
index 5616dfcd3a..0431bef31b 100644
--- a/library/cpp/charset/codepage.cpp
+++ b/library/cpp/charset/codepage.cpp
@@ -146,16 +146,16 @@ private:
AddNameWithCheck(name, code);
TString temp = name;
- RemoveAll(temp, '-');
- RemoveAll(temp, '_');
+ RemoveAll(temp, '-');
+ RemoveAll(temp, '_');
AddNameWithCheck(temp, code);
temp = name;
- SubstGlobal(temp, '-', '_');
+ SubstGlobal(temp, '-', '_');
AddNameWithCheck(temp, code);
temp = name;
- SubstGlobal(temp, '_', '-');
+ SubstGlobal(temp, '_', '-');
AddNameWithCheck(temp, code);
}
diff --git a/library/cpp/charset/codepage_ut.cpp b/library/cpp/charset/codepage_ut.cpp
index 11ae010b6e..c3ac3ac478 100644
--- a/library/cpp/charset/codepage_ut.cpp
+++ b/library/cpp/charset/codepage_ut.cpp
@@ -12,21 +12,21 @@
#endif
namespace {
- const char yandexUpperCase[] =
+ const char yandexUpperCase[] =
"\x81\x82\x83\x84\x85\x86\x87"
"\x8E"
"\xA1\xA2\xA3\xA4\xA5\xA6"
"\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF"
- "\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF"
- "\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF";
+ "\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF"
+ "\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF";
- const char yandexLowerCase[] =
+ const char yandexLowerCase[] =
"\x91\x92\x93\x94\x95\x96\x97"
"\x9E"
"\xB1\xB2\xB3\xB4\xB5\xB6"
"\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF"
- "\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF"
- "\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF";
+ "\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF"
+ "\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF";
}
class TCodepageTest: public TTestBase {
@@ -163,7 +163,7 @@ void TCodepageTest::TestUTF() {
void TCodepageTest::TestBrokenMultibyte() {
const ECharset cp = CODES_EUC_JP;
- const char sampletext[] = {'\xe3'};
+ const char sampletext[] = {'\xe3'};
wchar32 recodeResult[100];
size_t nwritten = 0;
@@ -332,7 +332,7 @@ void TCodepageTest::TestToLower() {
const size_t n = Y_ARRAY_SIZE(yandexUpperCase); // including NTS
memcpy(data, yandexUpperCase, n);
ToLower(data, n - 1);
- UNIT_ASSERT(strcmp(data, yandexLowerCase) == 0);
+ UNIT_ASSERT(strcmp(data, yandexLowerCase) == 0);
}
void TCodepageTest::TestToUpper() {
@@ -341,7 +341,7 @@ void TCodepageTest::TestToUpper() {
const size_t n = Y_ARRAY_SIZE(yandexLowerCase); // including NTS
memcpy(data, yandexLowerCase, n);
ToUpper(data, n - 1);
- UNIT_ASSERT(strcmp(data, yandexUpperCase) == 0);
+ UNIT_ASSERT(strcmp(data, yandexUpperCase) == 0);
}
static void TestCanEncodeEmpty() {
diff --git a/library/cpp/charset/generated/encrec_data.cpp b/library/cpp/charset/generated/encrec_data.cpp
index 26a5066d3c..ca59f8ddef 100644
--- a/library/cpp/charset/generated/encrec_data.cpp
+++ b/library/cpp/charset/generated/encrec_data.cpp
@@ -614,8 +614,8 @@ static const char PP_35[257] =
"\000\000\000\000";
#define P35 (char*)PP_35
static const char PP_36[257] =
- "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+ "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -8410,8 +8410,8 @@ const Encoder* const NCodepagePrivate::TCodePageData::EncodeTo[] = {
const struct Encoder &WideCharToYandex = encoder_09;
const Recoder NCodepagePrivate::TCodePageData::rcdr_to_yandex[] = {
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -8425,8 +8425,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_to_yandex[] = {
"\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351"
"\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373"
"\374\375\376\377"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -8440,8 +8440,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_to_yandex[] = {
"\374\373\347\370\375\371\367\372\336\300\301\326\304\305\324\303\325\310"
"\311\312\313\314\315\316\317\337\320\321\322\323\306\302\334\333\307\330"
"\335\331\327\332"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -8455,8 +8455,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_to_yandex[] = {
"\260\260\260\260\260\260\260\260\360\361\362\363\364\365\366\367\370\371"
"\372\373\374\375\376\377\250\270\256\276\257\277\254\274\260\075\055\075"
"\267\044\260\240"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -8470,8 +8470,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_to_yandex[] = {
"\254\274\246\266\267\250\270\377\340\341\342\343\344\345\346\347\350\351"
"\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373"
"\374\375\376\044"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -8485,8 +8485,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_to_yandex[] = {
"\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371"
"\372\373\374\375\376\377\267\270\266\343\276\266\275\277\266\266\266\266"
"\352\247\274\266"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -8500,8 +8500,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_to_yandex[] = {
"\246\125\125\125\203\131\246\220\210\141\211\141\221\141\266\212\213\214"
"\215\230\151\151\231\232\266\156\157\262\233\157\222\075\266\234\165\235"
"\223\171\266\171"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -8515,8 +8515,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_to_yandex[] = {
"\260\260\260\260\260\260\260\260\260\260\260\260\260\260\260\260\260\260"
"\260\260\260\260\260\260\260\260\260\260\260\260\260\260\260\260\260\260"
"\260\260\260\260"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -8530,8 +8530,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_to_yandex[] = {
"\122\125\125\125\203\131\124\220\162\141\211\141\221\154\225\212\143\214"
"\226\230\145\151\231\144\266\261\156\262\233\157\222\075\162\165\165\165"
"\223\171\164\140"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -8545,8 +8545,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_to_yandex[] = {
"\122\125\125\125\203\131\124\220\162\141\211\141\221\154\225\212\143\214"
"\226\230\145\151\231\144\266\261\156\262\233\157\222\075\162\165\165\165"
"\223\171\164\140"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -8562,8 +8562,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_to_yandex[] = {
"\374\375\376\377"},},
{{},},
{{},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -8593,8 +8593,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_to_yandex[] = {
"\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077"
"\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077"
"\077\077\077\077"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -9744,8 +9744,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_to_yandex[] = {
};
const Recoder NCodepagePrivate::TCodePageData::rcdr_from_yandex[] = {
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -9759,8 +9759,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_from_yandex[] = {
"\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351"
"\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373"
"\374\375\376\377"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -9774,8 +9774,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_from_yandex[] = {
"\373\375\377\371\370\374\340\361\301\302\327\307\304\305\326\332\311\312"
"\313\314\315\316\317\320\322\323\324\325\306\310\303\336\333\335\337\331"
"\330\334\300\321"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -9789,8 +9789,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_from_yandex[] = {
"\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251"
"\252\253\254\255\256\257\340\341\342\343\344\345\346\347\350\351\352\353"
"\354\355\356\357"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -9804,8 +9804,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_from_yandex[] = {
"\230\231\232\233\234\235\236\237\340\341\342\343\344\345\346\347\350\351"
"\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373"
"\374\375\376\337"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -9819,8 +9819,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_from_yandex[] = {
"\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331"
"\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353"
"\354\355\356\357"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -9834,8 +9834,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_from_yandex[] = {
"\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077"
"\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077"
"\077\077\077\077"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -9849,8 +9849,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_from_yandex[] = {
"\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077"
"\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077"
"\077\077\077\077"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -9864,8 +9864,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_from_yandex[] = {
"\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077"
"\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077"
"\077\077\077\077"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -9879,8 +9879,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_from_yandex[] = {
"\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077"
"\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077"
"\077\077\077\077"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -9896,8 +9896,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_from_yandex[] = {
"\374\375\376\377"},},
{{},},
{{},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
@@ -9927,8 +9927,8 @@ const Recoder NCodepagePrivate::TCodePageData::rcdr_from_yandex[] = {
"\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077"
"\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077\077"
"\077\077\077\077"},},
-{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
- "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
+{{"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021"
+ "\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043"
"\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065"
"\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107"
"\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131"
diff --git a/library/cpp/charset/wide_ut.cpp b/library/cpp/charset/wide_ut.cpp
index 218a329041..78947d51ba 100644
--- a/library/cpp/charset/wide_ut.cpp
+++ b/library/cpp/charset/wide_ut.cpp
@@ -1,6 +1,6 @@
#include "wide.h"
#include "codepage.h"
-#include "recyr.hh"
+#include "recyr.hh"
#include <library/cpp/testing/unittest/registar.h>
@@ -12,25 +12,25 @@
namespace {
//! three UTF8 encoded russian letters (A, B, V)
- const char yandexCyrillicAlphabet[] =
- "\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF" // A - P
- "\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF" // R - YA
- "\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF" // a - p
- "\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"; // r - ya
+ const char yandexCyrillicAlphabet[] =
+ "\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF" // A - P
+ "\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF" // R - YA
+ "\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF" // a - p
+ "\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"; // r - ya
const wchar16 wideCyrillicAlphabet[] = {
0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F,
0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F,
0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F,
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F, 0x00};
- const char utf8CyrillicAlphabet[] =
- "\xd0\x90\xd0\x91\xd0\x92\xd0\x93\xd0\x94\xd0\x95\xd0\x96\xd0\x97"
- "\xd0\x98\xd0\x99\xd0\x9a\xd0\x9b\xd0\x9c\xd0\x9d\xd0\x9e\xd0\x9f"
- "\xd0\xa0\xd0\xa1\xd0\xa2\xd0\xa3\xd0\xa4\xd0\xa5\xd0\xa6\xd0\xa7"
- "\xd0\xa8\xd0\xa9\xd0\xaa\xd0\xab\xd0\xac\xd0\xad\xd0\xae\xd0\xaf"
- "\xd0\xb0\xd0\xb1\xd0\xb2\xd0\xb3\xd0\xb4\xd0\xb5\xd0\xb6\xd0\xb7"
- "\xd0\xb8\xd0\xb9\xd0\xba\xd0\xbb\xd0\xbc\xd0\xbd\xd0\xbe\xd0\xbf"
- "\xd1\x80\xd1\x81\xd1\x82\xd1\x83\xd1\x84\xd1\x85\xd1\x86\xd1\x87"
- "\xd1\x88\xd1\x89\xd1\x8a\xd1\x8b\xd1\x8c\xd1\x8d\xd1\x8e\xd1\x8f";
+ const char utf8CyrillicAlphabet[] =
+ "\xd0\x90\xd0\x91\xd0\x92\xd0\x93\xd0\x94\xd0\x95\xd0\x96\xd0\x97"
+ "\xd0\x98\xd0\x99\xd0\x9a\xd0\x9b\xd0\x9c\xd0\x9d\xd0\x9e\xd0\x9f"
+ "\xd0\xa0\xd0\xa1\xd0\xa2\xd0\xa3\xd0\xa4\xd0\xa5\xd0\xa6\xd0\xa7"
+ "\xd0\xa8\xd0\xa9\xd0\xaa\xd0\xab\xd0\xac\xd0\xad\xd0\xae\xd0\xaf"
+ "\xd0\xb0\xd0\xb1\xd0\xb2\xd0\xb3\xd0\xb4\xd0\xb5\xd0\xb6\xd0\xb7"
+ "\xd0\xb8\xd0\xb9\xd0\xba\xd0\xbb\xd0\xbc\xd0\xbd\xd0\xbe\xd0\xbf"
+ "\xd1\x80\xd1\x81\xd1\x82\xd1\x83\xd1\x84\xd1\x85\xd1\x86\xd1\x87"
+ "\xd1\x88\xd1\x89\xd1\x8a\xd1\x8b\xd1\x8c\xd1\x8d\xd1\x8e\xd1\x8f";
TString CreateYandexText() {
const int len = 256;
@@ -69,31 +69,31 @@ namespace {
}
TString CreateUTF8Text() {
- char text[] = {
- '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f',
- '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f',
- '\x20', '\x21', '\x22', '\x23', '\x24', '\x25', '\x26', '\x27', '\x28', '\x29', '\x2a', '\x2b', '\x2c', '\x2d', '\x2e', '\x2f',
- '\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', '\x38', '\x39', '\x3a', '\x3b', '\x3c', '\x3d', '\x3e', '\x3f',
- '\x40', '\x41', '\x42', '\x43', '\x44', '\x45', '\x46', '\x47', '\x48', '\x49', '\x4a', '\x4b', '\x4c', '\x4d', '\x4e', '\x4f',
- '\x50', '\x51', '\x52', '\x53', '\x54', '\x55', '\x56', '\x57', '\x58', '\x59', '\x5a', '\x5b', '\x5c', '\x5d', '\x5e', '\x5f',
- '\x60', '\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', '\x68', '\x69', '\x6a', '\x6b', '\x6c', '\x6d', '\x6e', '\x6f',
- '\x70', '\x71', '\x72', '\x73', '\x74', '\x75', '\x76', '\x77', '\x78', '\x79', '\x7a', '\x7b', '\x7c', '\x7d', '\x7e', '\x7f',
- '\xcc', '\x81', '\xc3', '\x84', '\xc3', '\x96', '\xc3', '\x9c', '\xc4', '\x84', '\xc4', '\x86', '\xc4', '\x98', '\xc5', '\x81',
- '\xc3', '\xa0', '\xc3', '\xa2', '\xc3', '\xa7', '\xc3', '\xa8', '\xc3', '\xa9', '\xc3', '\xaa', '\xd2', '\x90', '\xc2', '\xad',
- '\xc3', '\x9f', '\xc3', '\xa4', '\xc3', '\xb6', '\xc3', '\xbc', '\xc4', '\x85', '\xc4', '\x87', '\xc4', '\x99', '\xc5', '\x82',
- '\xc3', '\xab', '\xc3', '\xae', '\xc3', '\xaf', '\xc3', '\xb4', '\xc3', '\xb9', '\xc3', '\xbb', '\xd2', '\x91', '\xe9', '\x8b',
- '\x8f', '\xc2', '\xa0', '\xc5', '\x83', '\xc3', '\x93', '\xc5', '\x9a', '\xc5', '\xbb', '\xc5', '\xb9', '\xd1', '\xac', '\xc2',
- '\xa7', '\xd0', '\x81', '\xd1', '\xa2', '\xd1', '\xb2', '\xd1', '\xb4', '\xd0', '\x8e', '\xd0', '\x86', '\xd0', '\x84', '\xd0',
- '\x87', '\xc2', '\xb0', '\xc5', '\x84', '\xc3', '\xb3', '\xc5', '\x9b', '\xc5', '\xbc', '\xc5', '\xba', '\xd1', '\xad', '\xe2',
- '\x84', '\x96', '\xd1', '\x91', '\xd1', '\xa3', '\xd1', '\xb3', '\xd1', '\xb5', '\xd1', '\x9e', '\xd1', '\x96', '\xd1', '\x94',
- '\xd1', '\x97', '\xd0', '\x90', '\xd0', '\x91', '\xd0', '\x92', '\xd0', '\x93', '\xd0', '\x94', '\xd0', '\x95', '\xd0', '\x96',
- '\xd0', '\x97', '\xd0', '\x98', '\xd0', '\x99', '\xd0', '\x9a', '\xd0', '\x9b', '\xd0', '\x9c', '\xd0', '\x9d', '\xd0', '\x9e',
- '\xd0', '\x9f', '\xd0', '\xa0', '\xd0', '\xa1', '\xd0', '\xa2', '\xd0', '\xa3', '\xd0', '\xa4', '\xd0', '\xa5', '\xd0', '\xa6',
- '\xd0', '\xa7', '\xd0', '\xa8', '\xd0', '\xa9', '\xd0', '\xaa', '\xd0', '\xab', '\xd0', '\xac', '\xd0', '\xad', '\xd0', '\xae',
- '\xd0', '\xaf', '\xd0', '\xb0', '\xd0', '\xb1', '\xd0', '\xb2', '\xd0', '\xb3', '\xd0', '\xb4', '\xd0', '\xb5', '\xd0', '\xb6',
- '\xd0', '\xb7', '\xd0', '\xb8', '\xd0', '\xb9', '\xd0', '\xba', '\xd0', '\xbb', '\xd0', '\xbc', '\xd0', '\xbd', '\xd0', '\xbe',
- '\xd0', '\xbf', '\xd1', '\x80', '\xd1', '\x81', '\xd1', '\x82', '\xd1', '\x83', '\xd1', '\x84', '\xd1', '\x85', '\xd1', '\x86',
- '\xd1', '\x87', '\xd1', '\x88', '\xd1', '\x89', '\xd1', '\x8a', '\xd1', '\x8b', '\xd1', '\x8c', '\xd1', '\x8d', '\xd1', '\x8e',
+ char text[] = {
+ '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f',
+ '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f',
+ '\x20', '\x21', '\x22', '\x23', '\x24', '\x25', '\x26', '\x27', '\x28', '\x29', '\x2a', '\x2b', '\x2c', '\x2d', '\x2e', '\x2f',
+ '\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', '\x38', '\x39', '\x3a', '\x3b', '\x3c', '\x3d', '\x3e', '\x3f',
+ '\x40', '\x41', '\x42', '\x43', '\x44', '\x45', '\x46', '\x47', '\x48', '\x49', '\x4a', '\x4b', '\x4c', '\x4d', '\x4e', '\x4f',
+ '\x50', '\x51', '\x52', '\x53', '\x54', '\x55', '\x56', '\x57', '\x58', '\x59', '\x5a', '\x5b', '\x5c', '\x5d', '\x5e', '\x5f',
+ '\x60', '\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', '\x68', '\x69', '\x6a', '\x6b', '\x6c', '\x6d', '\x6e', '\x6f',
+ '\x70', '\x71', '\x72', '\x73', '\x74', '\x75', '\x76', '\x77', '\x78', '\x79', '\x7a', '\x7b', '\x7c', '\x7d', '\x7e', '\x7f',
+ '\xcc', '\x81', '\xc3', '\x84', '\xc3', '\x96', '\xc3', '\x9c', '\xc4', '\x84', '\xc4', '\x86', '\xc4', '\x98', '\xc5', '\x81',
+ '\xc3', '\xa0', '\xc3', '\xa2', '\xc3', '\xa7', '\xc3', '\xa8', '\xc3', '\xa9', '\xc3', '\xaa', '\xd2', '\x90', '\xc2', '\xad',
+ '\xc3', '\x9f', '\xc3', '\xa4', '\xc3', '\xb6', '\xc3', '\xbc', '\xc4', '\x85', '\xc4', '\x87', '\xc4', '\x99', '\xc5', '\x82',
+ '\xc3', '\xab', '\xc3', '\xae', '\xc3', '\xaf', '\xc3', '\xb4', '\xc3', '\xb9', '\xc3', '\xbb', '\xd2', '\x91', '\xe9', '\x8b',
+ '\x8f', '\xc2', '\xa0', '\xc5', '\x83', '\xc3', '\x93', '\xc5', '\x9a', '\xc5', '\xbb', '\xc5', '\xb9', '\xd1', '\xac', '\xc2',
+ '\xa7', '\xd0', '\x81', '\xd1', '\xa2', '\xd1', '\xb2', '\xd1', '\xb4', '\xd0', '\x8e', '\xd0', '\x86', '\xd0', '\x84', '\xd0',
+ '\x87', '\xc2', '\xb0', '\xc5', '\x84', '\xc3', '\xb3', '\xc5', '\x9b', '\xc5', '\xbc', '\xc5', '\xba', '\xd1', '\xad', '\xe2',
+ '\x84', '\x96', '\xd1', '\x91', '\xd1', '\xa3', '\xd1', '\xb3', '\xd1', '\xb5', '\xd1', '\x9e', '\xd1', '\x96', '\xd1', '\x94',
+ '\xd1', '\x97', '\xd0', '\x90', '\xd0', '\x91', '\xd0', '\x92', '\xd0', '\x93', '\xd0', '\x94', '\xd0', '\x95', '\xd0', '\x96',
+ '\xd0', '\x97', '\xd0', '\x98', '\xd0', '\x99', '\xd0', '\x9a', '\xd0', '\x9b', '\xd0', '\x9c', '\xd0', '\x9d', '\xd0', '\x9e',
+ '\xd0', '\x9f', '\xd0', '\xa0', '\xd0', '\xa1', '\xd0', '\xa2', '\xd0', '\xa3', '\xd0', '\xa4', '\xd0', '\xa5', '\xd0', '\xa6',
+ '\xd0', '\xa7', '\xd0', '\xa8', '\xd0', '\xa9', '\xd0', '\xaa', '\xd0', '\xab', '\xd0', '\xac', '\xd0', '\xad', '\xd0', '\xae',
+ '\xd0', '\xaf', '\xd0', '\xb0', '\xd0', '\xb1', '\xd0', '\xb2', '\xd0', '\xb3', '\xd0', '\xb4', '\xd0', '\xb5', '\xd0', '\xb6',
+ '\xd0', '\xb7', '\xd0', '\xb8', '\xd0', '\xb9', '\xd0', '\xba', '\xd0', '\xbb', '\xd0', '\xbc', '\xd0', '\xbd', '\xd0', '\xbe',
+ '\xd0', '\xbf', '\xd1', '\x80', '\xd1', '\x81', '\xd1', '\x82', '\xd1', '\x83', '\xd1', '\x84', '\xd1', '\x85', '\xd1', '\x86',
+ '\xd1', '\x87', '\xd1', '\x88', '\xd1', '\x89', '\xd1', '\x8a', '\xd1', '\x8b', '\xd1', '\x8c', '\xd1', '\x8d', '\xd1', '\x8e',
'\xd1', '\x8f'};
return TString(text, Y_ARRAY_SIZE(text));
}
@@ -206,7 +206,7 @@ static void TestSurrogates(const char* str, const wchar16* wide, size_t wideSize
void TConversionTest::TestYandexEncoding() {
TUtf16String w = UTF8ToWide(utf8CyrillicAlphabet, strlen(utf8CyrillicAlphabet), csYandex);
UNIT_ASSERT(w == wideCyrillicAlphabet);
- w = UTF8ToWide(yandexCyrillicAlphabet, strlen(yandexCyrillicAlphabet), csYandex);
+ w = UTF8ToWide(yandexCyrillicAlphabet, strlen(yandexCyrillicAlphabet), csYandex);
UNIT_ASSERT(w == wideCyrillicAlphabet);
const char* utf8NonBMP2 = "ab\xf4\x80\x89\x87n";