mysql - Problems with Hidden nulls in text output -


i'm having problems appears hidden null characters in text data trying extract wins server create list of machine names beginning s , 6 numbers.

input data like: s123456 [20h] dynamic active 1234567 unique 6/7/2014 ...

$output_file='d:\blah blah\workstations.txt' $regex='\b[s]\d{6}\b'  select-string -path $input_path -pattern "active" |select-object line | `     select-string -pattern $regex -allmatches|%{$_.matches}|%{$_.value -replace "`r|`n",""}|    get-unique > $output_file 

when try load mysql table s null 1 null 2 null ... how can strip nulls out or avoid them?

here answer based on comment sequence above. can set encoding of output text file. built-in powershell commands write text files accept -encoding parameter purpose. changing

> $output_file 

to

| set-content -path $output_file -encoding utf8 

will set file encoding specify.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -