: CHGSTR.EXE


kdolzhanskiy@vk
28-12-2018, 16:05
, bat ( txt) (UPPER CASE), xml. RDS- . " " .
, " - ".

:
OnAir.txt: Malika Yes -
OnAir_convert.txt: MALIKA YES - OYNAMAYIN SENIMEN

:
OnAir.txt: Azamat - Araiym
>OnAir_convert.txt:AZAMAT - ARAIYM

bat CHGSTR.EXE, . Win10 Win7
@echo off

set file=text.txt

copy %file% %file%.bak

CHGSTR "*" "a" %file%
CHGSTR "" "b" %file%
CHGSTR "" "v" %file%
CHGSTR "" "g" %file%
CHGSTR "" "d" %file%
CHGSTR "" "e" %file%
CHGSTR "" "e" %file%
CHGSTR "" "zh" %file%
CHGSTR "" "z" %file%
CHGSTR "" "i" %file%
CHGSTR "" "io" %file%
CHGSTR "" "k" %file%
CHGSTR "" "l" %file%
CHGSTR "" "m" %file%
CHGSTR "*" "n" %file%
CHGSTR "" "o" %file%
CHGSTR "" "p" %file%
CHGSTR "" "r" %file%
CHGSTR "" "s" %file%
CHGSTR "" "t" %file%
CHGSTR "" "u" %file%
CHGSTR "" "f" %file%
CHGSTR "" "h" %file%
CHGSTR "" "c" %file%
CHGSTR "" "ch" %file%
CHGSTR "" "sh" %file%
CHGSTR "" "sh" %file%
CHGSTR "" "!" %file%
CHGSTR "" "i" %file%
CHGSTR "" "!" %file%
CHGSTR "" "e" %file%
CHGSTR "" "yu" %file%
CHGSTR "" "ya" %file%


CHGSTR "" "A" %file%
CHGSTR "" "B" %file%
CHGSTR "" "V" %file%
CHGSTR "" "G" %file%
CHGSTR "" "D" %file%
CHGSTR "" "E" %file%
CHGSTR "" "E" %file%
CHGSTR "" "ZH" %file%
CHGSTR "" "Z" %file%
CHGSTR "" "I" %file%
CHGSTR "" "IO" %file%
CHGSTR "" "K" %file%
CHGSTR "" "L" %file%
CHGSTR "" "M" %file%
CHGSTR "" "N" %file%
CHGSTR "" "O" %file%
CHGSTR "" "P" %file%
CHGSTR "" "R" %file%
CHGSTR "" "S" %file%
CHGSTR "" "T" %file%
CHGSTR "" "U" %file%
CHGSTR "" "F" %file%
CHGSTR "" "H" %file%
CHGSTR "" "C" %file%
CHGSTR "" "CH" %file%
CHGSTR "" "SH" %file%
CHGSTR "" "SH" %file%
CHGSTR "" "!" %file%
CHGSTR "" "I" %file%
CHGSTR "" "!" %file%
CHGSTR "" "E" %file%
CHGSTR "" "YU" %file%
CHGSTR "" "YA" %file%

Iska
28-12-2018, 17:47
kdolzhanskiy@vk, xml , , - UTF-8, ?

xml , , , .

YuS_2
28-12-2018, 17:52
Win10 Win7
powershell:
function global:translit {
process {
$charr = @{
[char]'' = "A"
[char]'' = "a"
[char]'' = "B"
[char]'' = "b"
[char]'' = "V"
[char]'' = "v"
[char]'' = "G"
[char]'' = "g"
[char]'' = "D"
[char]'' = "d"
[char]'' = "E"
[char]'' = "e"
[char]'' = "E"
[char]'' = "e"
[char]'' = "ZH"
[char]'' = "zh"
[char]'' = "Z"
[char]'' = "z"
[char]'' = "I"
[char]'' = "i"
[char]'' = "I"
[char]'' = "i"
[char]'' = "K"
[char]'' = "k"
[char]'' = "L"
[char]'' = "l"
[char]'' = "M"
[char]'' = "m"
[char]'' = "N"
[char]'' = "n"
[char]'' = "O"
[char]'' = "o"
[char]'' = "P"
[char]'' = "p"
[char]'' = "R"
[char]'' = "r"
[char]'' = "S"
[char]'' = "s"
[char]'' = "T"
[char]'' = "t"
[char]'' = "U"
[char]'' = "u"
[char]'' = "F"
[char]'' = "f"
[char]'' = "KH"
[char]'' = "kh"
[char]'' = "TC"
[char]'' = "tc"
[char]'' = "CH"
[char]'' = "ch"
[char]'' = "SH"
[char]'' = "sh"
[char]'' = "SHCH"
[char]'' = "shch"
[char]'' = ""
[char]'' = ""
[char]'' = "Y"
[char]'' = "y"
[char]'' = ""
[char]'' = ""
[char]'' = "E"
[char]'' = "e"
[char]'' = "YU"
[char]'' = "yu"
[char]'' = "YA"
[char]'' = "ya"
}
$_.tochararray()|%{
if ($charr[$_] -cne $null){
$arr += $charr[$_]
} else {
$arr += $_
}
}
write-output $arr
}
}
- . , , .

( ):
(gc onair.txt -enc utf8 -raw|translit).toupper()|out-file onair_convert.txt -enc utf8
, ...
@echo off
powershell -ex bypass -c "&{(gc onair.txt -enc utf8 -raw|translit).toupper()|out-file onair_convert.txt -enc utf8}"
pause&exit /b

, - powershell 5.1

kdolzhanskiy@vk
29-12-2018, 07:01
xml , , , .

xml - . . ,

kdolzhanskiy@vk
29-12-2018, 07:49
powershell:
. .

PS C:\WINDOWS\system32> F:\auto\translit.ps1
F:\auto\translit.ps1:7 :11
+ [char]'=' = "b"
+ ~
''='' -.
F:\auto\translit.ps1:71 :19
+ $_.tochararray()|%{
+ ~
''='' -.
F:\auto\translit.ps1:2 :10
+ process {
+ ~
"}" .
F:\auto\translit.ps1:1 :26
+ function global:translit {
+ ~
"}" .
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingEqualsInHashLiteral

Iska
29-12-2018, 08:01
kdolzhanskiy@vk, . UTF-8 BOM ( UTF-16LE/1200 BOM ANSI/1251).

P.S. -enc utf8 YuS_2 (ANSI/1251) -Encoding default.

YuS_2
29-12-2018, 10:13
P.S. -enc utf8 YuS_2 (ANSI/1251) -Encoding default.
, , ...

Iska
29-12-2018, 16:22
YuS_2, txt- , ANSI/1251. xml, , - UTF-8.

YuS_2
29-12-2018, 19:05
txt-
, ... xml . , default ! :)

Busla
30-12-2018, 13:07
kdolzhanskiy@vk, . - , , .

YuS_2, begin
?

Iska
30-12-2018, 13:41
kdolzhanskiy@vk, . - , , .
:).

?
? YuS_2 C- , , ;).

YuS_2
30-12-2018, 17:22
begin
, ...

?
C- , ,
, , ... , . :)

Iska
30-12-2018, 17:35
, , :).

kdolzhanskiy@vk
03-01-2019, 07:53
, - bat. : NowPlayingTemplate.htm - > index.htm -> OnAir.txt auto.7z YuS_2
Iska Powershell. translit ( ), , , .

YuS_2
03-01-2019, 12:15
.
?
...
, , ( , Users\NAME_USER\Documents\WindowsPowerShell\profile.ps1 : Microsoft.PowerShell_profile.ps1), , powershell... .bat, .
:
function global:translit {
begin {
$charr = @{
[char]'' = 'A'
[char]'' = 'a'
[char]'' = 'B'
[char]'' = 'b'
[char]'' = 'V'
[char]'' = 'v'
[char]'' = 'G'
[char]'' = 'g'
[char]'' = 'D'
[char]'' = 'd'
[char]'' = 'E'
[char]'' = 'e'
[char]'' = 'E'
[char]'' = 'e'
[char]'' = 'ZH'
[char]'' = 'zh'
[char]'' = 'Z'
[char]'' = 'z'
[char]'' = 'I'
[char]'' = 'i'
[char]'' = 'I'
[char]'' = 'i'
[char]'' = 'K'
[char]'' = 'k'
[char]'' = 'L'
[char]'' = 'l'
[char]'' = 'M'
[char]'' = 'm'
[char]'' = 'N'
[char]'' = 'n'
[char]'' = 'O'
[char]'' = 'o'
[char]'' = 'P'
[char]'' = 'p'
[char]'' = 'R'
[char]'' = 'r'
[char]'' = 'S'
[char]'' = 's'
[char]'' = 'T'
[char]'' = 't'
[char]'' = 'U'
[char]'' = 'u'
[char]'' = 'F'
[char]'' = 'f'
[char]'' = 'KH'
[char]'' = 'kh'
[char]'' = 'TC'
[char]'' = 'tc'
[char]'' = 'CH'
[char]'' = 'ch'
[char]'' = 'SH'
[char]'' = 'sh'
[char]'' = 'SHCH'
[char]'' = 'shch'
[char]'' = ''
[char]'' = ''
[char]'' = 'Y'
[char]'' = 'y'
[char]'' = ''
[char]'' = ''
[char]'' = 'E'
[char]'' = 'e'
[char]'' = 'YU'
[char]'' = 'yu'
[char]'' = 'YA'
[char]'' = 'ya'
}

}
process {
$_.tochararray()|%{
if ($charr[$_] -cne $null){
$arr += $charr[$_]
} else {
$arr += $_
}
}
write-output $arr
}
}
, , utf8 default , 1251

Busla
03-01-2019, 12:43
kdolzhanskiy@vk, PoSh . .

:
. ,
- powershell powershell
powershell
$PROFILE

, :
notepad.exe $PROFILE
, UTF-8

translit -

YuS_2 Iska Powershell

, - (regexp); html/xml - DOM, xPath, XSLT.

, NowPlayingTemplate.htm - - html

powershell . ( : ) MS, . - .
, powershell - Haskell Python.

Iska
03-01-2019, 13:45
, NowPlayingTemplate.htm - - html
- include .

powershell .
, :(

kdolzhanskiy@vk
03-01-2019, 14:02
, NowPlayingTemplate.htm - - html
html c xml.




© OSzone.net 2001-2012