Questions tagged [nul]

NUL is the abbreviation for the null character in several character sets

NUL has a value of 0 and is often written as the escape sequence \0. It is used as a terminator in standard strings.

179 questions
0
votes
1 answer

Is "C:\nul" directed to any file or folder?

I used this code to create a filestream ,and I tried to output something by this filestream. Here's my cpp code : (MinGW 9.2.1,Windows 10) ofstream outfile; outfile.open("C:\\nul"); for(unsigned long long i=1llu;i<=18446744073709551615ull;++i) …
Suansuan
  • 1
  • 1
0
votes
1 answer

load RData file shows this error: embedded nul character

I tried to figure out the problem, but didn't find a solution. Following problem: I've tried to load this Rdata file. It is about 4 GB. But I always got the error. Error in load.....Embedded nul…
0
votes
1 answer

Why does GetPrivateProfileSection retrieve each character as a two byte value, padding them with a NULL character?

Given this piece of code: Private Declare Auto Function GetPrivateProfileSection Lib "kernel32" _ (ByVal lpAppName As String, _ ByVal lpszReturnBuffer As Byte(), _ ByVal nSize As Integer, ByVal lpFileName As String) As…
Amessihel
  • 5,891
  • 3
  • 16
  • 40
0
votes
0 answers

Writing to a file using write() is adding nuls all over the place, how to remove them?

I am having some issues using write(). I am writing a 2d array to a .txt file but when it gets written to the file a bunch of NUL chars(not NULL) get added to the file. so I went searching around and found this to remove characters but was of no…
Mauro
  • 23
  • 5
0
votes
0 answers

Batch - Sending Standard Error/Output with Shift and Looping

I need help with some batch. We are not allowed to use if errorlevel statements yet or anything advanced, we are just in an introductory phase and the first couple weeks of class. Just using standard error/output, stuff like that. I am bit stuck on…
0
votes
3 answers

Piping into replace discards all my data?

I'm running the following command that returns a long list of virtual machines: $vms = Get-AzureRmVM -status | select name,@{ n='IP Address'; e={"IP removed"}}, @{ n='OsType'; e={$_.StorageProfile.OsDisk.OsType}}, powerState $vms When I pipe into…
pointysparrow
  • 23
  • 1
  • 3
0
votes
1 answer

Converting null-terminated lines to JSON strings with jq

I've come up with a jq-based one-liner that converts a sequence of null-terminated strings to a sequence of JSON strings: xargs -0 dash -c 'for i in "$@"; do printf %s "$i" | jq -Rs . ; done' _dummy_ I'd like to cut xargs and/or dash out of it if…
psmay
  • 1,001
  • 7
  • 17
0
votes
2 answers

Is NUL set automatically, if I provide an extra element for it in the declaration of the respective char array?

Is '\0' set automatically if I provide an extra element for it, but left it in the initialization string? Like: char a[6] = {"Hello"}; // <- Is NUL set here automatically? I´ve did one experiment with C and C++:` C: #include int…
0
votes
2 answers

How to create a file in the directory in PowerShell

My dirctory is D:\\Main. I want to create a file named file.js in the directory only i.e. D:\\Main. I use the code type nul > file.js. It creates the file but also displayes an error message saying that nul folder wasn't found. Am I doing something…
mmaismma
  • 763
  • 6
  • 19
0
votes
4 answers

Why doesn't strlen() count the byte of the terminating NUL-character, when the NUL-character is defined to be part of a string?

I know that strlen() does not count the NUL-terminating character with. I really know that this is a fact. Thus, this question is NOT about asking for why strlen() might "presumably" not return the right string length, which is already asked and…
0
votes
0 answers

Reading CRAN archive.rds fails in Docker container

I am trying to install some specific versions of R packages inside a Docker image. To this end I have written a function that queries the archive.rds metadata of CRAN similar to this: meta <- paste0(contrib.url(getOption("repos"), "source"),…
0
votes
1 answer

Itextsharp open new tab ISSUE

I need to open pdf in the new tab, it works and file show perfect, but if I open File with notepadd++, after EOF there are some NULL char (see pics). It happen only I open it in new tab and use memorystream, the string after EOF create some problem…
user3699954
  • 31
  • 1
  • 4
0
votes
0 answers

Redshift Copy errors out when trying to load NUL

I am loading data to Redshift using Copy. The text file has NUL. I have looked at several options and tried using options such as: null as '\0' EMPTYASNULL ACCEPTINVCHARS TRIMBLANKS TRUNCATECOLUMNS escape However, it still errors out. Below…
dan1197
  • 13
  • 1
  • 1
  • 4
0
votes
0 answers

sed to replace NUL or CRLF (if not at end of line) in text file or powershell windows

I spent several hours looking at different posts and testing different solutions but none worked. I tried sed, powershell and heard of tr but could not configure/install it correctly. I receive hundreds of text files to a windows server. The files…
dan1197
  • 13
  • 1
  • 1
  • 4
0
votes
0 answers

How to make a "type" command go >nul if "The system cannot find the file specifed"

I have been testing a batch file, that I used to see if my ideas work in batch. I had an idea to make a logging system, but if the file cant be found it doesn't show "The system cannot find the file specified." I've tried type A6Test.log &if…
Unkn0wn
  • 1
  • 3