This commit is contained in:
softlandia 2020-07-09 17:40:12 +04:00
Родитель 8221c54f59
Коммит d8dd1a8ae5
5 изменённых файлов: 25 добавлений и 4 удалений

3
.gitignore поставляемый
Просмотреть файл

@ -2,4 +2,5 @@
*.7z *.7z
.idea/* .idea/*
tmp* tmp*
~* ~*
*.exe

Просмотреть файл

@ -59,6 +59,13 @@ _____________________________
* add tests * add tests
* add samples * add samples
_____________________________
## ver 0.5.2 // 2020.07.09 ##
* add license
* add to code_pages_id.go new alias for KOI-8
### todo ### ### todo ###
- string UTF32 w/o bom and w/o russian char detect as UTF16 - string UTF32 w/o bom and w/o russian char detect as UTF16

13
LICENSE Normal file
Просмотреть файл

@ -0,0 +1,13 @@
 Copyright 2020 Vitaly Sergienko softlandia@gmail.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Просмотреть файл

@ -91,9 +91,8 @@ ReadBufSize int = 1024 // default count of byte to read from input reader for de
cpn may contain the name of the encoding of the input data, cpn may contain the name of the encoding of the input data,
we can ommit cpn, then the encoding of the input data is determined automatically we can ommit cpn, then the encoding of the input data is determined automatically
NewReaderTo(r io.Reader) io.Reader NewReaderTo(r io.Reader, cpn string) (io.Reader, error)
encode input reader to specified enconding encode input reader (MUST BE UTF-8) to specified enconding
input data ONLY in UTF-8
## tests and static analysis ## ## tests and static analysis ##

Просмотреть файл

@ -108,6 +108,7 @@ var nameMap = map[string]IDCodePage{
"cskoi8r": KOI8R, "cskoi8r": KOI8R,
"koi": KOI8R, "koi": KOI8R,
"koi8": KOI8R, "koi8": KOI8R,
"koi-8": KOI8R,
"koi8-r": KOI8R, "koi8-r": KOI8R,
"koi8_r": KOI8R, "koi8_r": KOI8R,
"koi8-ru": KOI8R, "koi8-ru": KOI8R,