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
0 answers

unwanted "NUL" characters string after reading bytes of a mjpg TCP stream

I'm trying to record a jpeg image sent by an Ethernet camera in a mjpg stream. The images I obtain with my Borland C++ application (VSPCIP) are sometimes "corrupted" : I have the example of a "corrupted jpeg frame" : it has 21690 characters (for a…
Arnaud
  • 109
  • 3
  • 15
0
votes
3 answers

Why do we need a null terminator only in strings in C?

I'm taking CS50X. I'm on week 2 now. my question is: why do we need a null character '\0' in strings (aka null terminated char arrays) to mark its end, while we don't need it in normal char arrays or a non-string data type array such as an int array…
Eyad Ayman
  • 11
  • 4
0
votes
0 answers

SQL Date inclusions

I have a table I am trying to connect to to give me a name (however this name table has multiply entries for a name). StaffName dateFrom dateTo JIAO-L 2023-03-17 NULL JIAO-M 2017-07-25 2023-03-16 I want to being back the name based on…
0
votes
1 answer

CSV using '-' as NULL. Error to convert column to INT

I have a CSV df = pd.read_csv('data.csv') Table: Column A Column B Column C 4068744 -1472525 2596219 198366 - - The file is using '-' for nul values I tried converting to int without handling that '-'. My question is: how do I strip…
TrueLies
  • 1
  • 1
0
votes
2 answers

Is there any way to prevent or detect char(0) from texts?

In some occasions, specially when copy-pasting, we end up having some text fields with a character 0 (nul) at the end of a string. It doesn't show in any way when you display the data, but you do detect it when you export it. We've tried to (at…
joanolo
  • 6,028
  • 1
  • 29
  • 37
0
votes
0 answers

pandas writes NUL character (\0) when calling to_csv

In one of my scripts I call the following code on my dataframe to save the data on disc. to_csv(input_folder / 'tmp' / section_fname, index=False, encoding='latin1', quoting=csv.QUOTE_NONNUMERIC) When I opened the created file with notepad++ in the…
Shoomaher
  • 1
  • 2
0
votes
1 answer

YAML file one line filled with null characters, #0000 character not supported while reading

I've built a python based application(which runs 24/7) that logs some information in a YAML file every few minutes. It was working perfectly for a few days. Suddenly after approximately after 2 weeks, one line in the YAML file was filled with NUL…
0
votes
1 answer

Is there a way to replace a NUL that got into a string in SQLite?

I have a Sqlite db that has gotten a NUL byte in some strings. I would like to replace that NUL byte with '\0' so that I know that string contained a NUL byte and everything following the NUL byte is visible. This is a db that I inherited from…
Adrian
  • 10,246
  • 4
  • 44
  • 110
0
votes
0 answers

Creating default object from empty value in Laravel 8

For some reason, I still get a warning message: Creating default object from empty value. Product controller public function update(Request $request, $id) { $products = new Product(); $products = Product::find($id); if…
iamraojee
  • 1
  • 2
0
votes
0 answers

Reading Nul character in binary file

I'm having trouble reading and writing the nul values in a binary file to a string. The file I have is a MS Word file. I have converted it into a binary file and had a look at it in vscode, but in some parts of the file there are red highlights of…
Jumanji176
  • 47
  • 9
0
votes
1 answer

'embedded nul in string' error trying to import multiple .csv files en masse from different subdirectories in R

I have a large number of csv data files that are located in many different subdirectories. The files all have the same name and are differentiated by the subdirectory name. I'm trying to find a way to import them all into r in such a way that the…
Phenomniverse
  • 309
  • 1
  • 8
0
votes
0 answers

Python problem reading CSV files that contain the word NUL

I have a short Python script for reading CSV files. So far nothing special. def csvReader(filename): return csv.reader(open(filename,'tr', encoding='utf-8')) for row in csvReader('test.csv'): print(row) However, it triggers an error…
Mephisto
  • 11
  • 1
0
votes
2 answers

How to insert the values of dictionary into null values of a dataframe in pandas?

I am new to pandas. I am facing an issue with null values. I have a dict of 3 values and keys which has to be inserted into a column of missing values how do I do that? The last word key is the name of the column name In [57]: df Out[57]: a b …
krish
  • 61
  • 9
0
votes
1 answer

Cannot get property 'show' on null object in grails

I am getting: Cannot get property 'show' on null object in my grails project Here is my code package com.djamware class TestController { EmployeeService employeeService def secondaryDataSourceTemplate def mainDataSourceTemplate …
Gaurav
  • 11
  • 2
0
votes
3 answers

How do I separate xmlstarlet output with nul?

To I'm trying use nul (U+0) to delimit xml values in xmlstarlet output. xmlstarlet ignores -o '', -o $'\0', and -o '\0'. I'm aware that I can use other characters like the various field separators to delimit output. The problem with this approach is…
Tenders McChiken
  • 1,216
  • 13
  • 21