<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ydb/library/cpp/tld/gen_tld.py, branch CLI_2.10.0</title>
<subtitle>Mirror of YDB github repos</subtitle>
<id>https://code.mastervirt.ru/ydb/atom?h=CLI_2.10.0</id>
<link rel='self' href='https://code.mastervirt.ru/ydb/atom?h=CLI_2.10.0'/>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/'/>
<updated>2023-06-28T14:27:42Z</updated>
<entry>
<title>fix gen_tld.py on non-unicode locale encodings</title>
<updated>2023-06-28T14:27:42Z</updated>
<author>
<name>Nikita Kozlovskiy</name>
<email>nikitka@gmail.com</email>
</author>
<published>2023-06-28T14:27:42Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=61de4a67fa045e1281fb392df8cbfbcd890bc104'/>
<id>urn:sha1:61de4a67fa045e1281fb392df8cbfbcd890bc104</id>
<content type='text'>
fix gen_tld.py on non-unicode locale encodings

In python versions prior to 3.7, as well as when using non-unicode locale encodings, the `gen_tld.py` script fails:

```
ydb/ydb/library/cpp/tld % git rev-parse head
97b1a695d3be4edc08550d3ae7d200f6d9f3d42e
ydb/ydb/library/cpp/tld % LC_CTYPE=C ~/.pyenv/versions/3.6.15/bin/python gen_tld.py tlds-alpha-by-domain.txt|md5
Traceback (most recent call last):
  File "gen_tld.py", line 57, in &lt;module&gt;
    main()
  File "gen_tld.py", line 39, in main
    sys.stdout.write('%s*/\n' % str.rstrip())
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)
```

This pull request fixes this behevaiour by explicit set output encoding to utf-8.


To ensure that I do not break anything, I checked the MD5 hash of the generated file before and after making my changes:

```
ydb/ydb/library/cpp/tld % git rev-parse head
97b1a695d3be4edc08550d3ae7d200f6d9f3d42e
ydb/ydb/library/cpp/tld % python3 gen_tld.py tlds-alpha-by-domain.txt|md5
564242d355d842db790977df3642a405
```

After

```

ydb/ydb/library/cpp/tld % git rev-parse head
1096dd7f034c573aabdf3bac2dc4b181a6688c71
ydb/ydb/library/cpp/tld % python3 gen_tld.py tlds-alpha-by-domain.txt|md5
564242d355d842db790977df3642a405
ydb/ydb/library/cpp/tld % LC_CTYPE=C ~/.pyenv/versions/3.6.15/bin/python gen_tld.py tlds-alpha-by-domain.txt|md5
564242d355d842db790977df3642a405
```

Pull Request resolved: #279</content>
</entry>
<entry>
<title>Port gen_tld to py3</title>
<updated>2022-12-16T04:54:23Z</updated>
<author>
<name>svidyuk</name>
<email>svidyuk@yandex-team.com</email>
</author>
<published>2022-12-16T04:54:23Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=fa371e5210e9cdda3fd6fc33af87a2458b69ab84'/>
<id>urn:sha1:fa371e5210e9cdda3fd6fc33af87a2458b69ab84</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Restoring authorship annotation for &lt;abolkhovityanov@yandex-team.ru&gt;. Commit 2 of 2.</title>
<updated>2022-02-10T13:50:49Z</updated>
<author>
<name>abolkhovityanov</name>
<email>abolkhovityanov@yandex-team.ru</email>
</author>
<published>2022-02-10T13:50:49Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=19ffdf9058e1d3256bb9ed882514581b7d4df261'/>
<id>urn:sha1:19ffdf9058e1d3256bb9ed882514581b7d4df261</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Restoring authorship annotation for &lt;abolkhovityanov@yandex-team.ru&gt;. Commit 1 of 2.</title>
<updated>2022-02-10T13:50:49Z</updated>
<author>
<name>abolkhovityanov</name>
<email>abolkhovityanov@yandex-team.ru</email>
</author>
<published>2022-02-10T13:50:49Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=812751ae6997d4a9efaca424ef7b2e1d06fa3771'/>
<id>urn:sha1:812751ae6997d4a9efaca424ef7b2e1d06fa3771</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Restoring authorship annotation for Anton Samokhvalov &lt;pg83@yandex.ru&gt;. Commit 2 of 2.</title>
<updated>2022-02-10T13:45:17Z</updated>
<author>
<name>Anton Samokhvalov</name>
<email>pg83@yandex.ru</email>
</author>
<published>2022-02-10T13:45:17Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=d3a398281c6fd1d3672036cb2d63f842d2cb28c5'/>
<id>urn:sha1:d3a398281c6fd1d3672036cb2d63f842d2cb28c5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Restoring authorship annotation for Anton Samokhvalov &lt;pg83@yandex.ru&gt;. Commit 1 of 2.</title>
<updated>2022-02-10T13:45:15Z</updated>
<author>
<name>Anton Samokhvalov</name>
<email>pg83@yandex.ru</email>
</author>
<published>2022-02-10T13:45:15Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=72cb13b4aff9bc9cf22e49251bc8fd143f82538f'/>
<id>urn:sha1:72cb13b4aff9bc9cf22e49251bc8fd143f82538f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>intermediate changes</title>
<updated>2022-02-07T15:08:42Z</updated>
<author>
<name>Devtools Arcadia</name>
<email>arcadia-devtools@yandex-team.ru</email>
</author>
<published>2022-02-07T15:08:42Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=1110808a9d39d4b808aef724c861a2e1a38d2a69'/>
<id>urn:sha1:1110808a9d39d4b808aef724c861a2e1a38d2a69</id>
<content type='text'>
ref:cde9a383711a11544ce7e107a78147fb96cc4029
</content>
</entry>
</feed>
